跳到正文
cccskills
免费在 GitHub 公开

pipeline-history-audit

Audit a MaaFramework/Maa-series project's Git history to learn how Pipeline JSON, interface options, Python AgentServer CustomAction code, and related data tables evolved. Use when asked to review a Maa project from initial commit through a target commit, map `action: Custom` pipeline nodes to `@AgentServer.custom_action(...)` implementations, find pipeline/custom/option patterns or breakages, and produce a report plus skill-improvement recommendations.

中文简介正在准备中。当前显示原文说明。

实测评分 未实测

查看安装方法

包含的文件(3)

  • SKILL.md6.3 KB
  • agents/openai.yaml259 B
  • evals/evals.json1.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Pipeline History Audit

Overview

Use this skill to let a Maa project "teach" its Pipeline and CustomAction conventions from real Git history. The output is an audit report, not a code change, unless the user explicitly asks to fix findings afterward.

Default to the current repository and current HEAD unless the user provides a path or commit. If the target checkout is not at the requested commit, read from git show <target>:<path> and git log <target> instead of moving the user's branch.

Workflow

  1. Ground the target.

    • Record repo root, current branch, HEAD, requested target commit, root commit, and git status --short.
    • Treat uncommitted changes as user work. Do not reset, checkout, clean, or format them.
    • If the user names a future/other commit that is not checked out, audit that commit object directly.
  2. Classify every commit.

    • Traverse with git log --reverse --date=short --format=%H%x00%h%x00%ad%x00%s <target>.
    • For each commit, inspect git diff-tree --root --no-commit-id --name-status -r <commit>.
    • Mark a commit as relevant if it touches:
      • assets/resource/**/pipeline*.json
      • assets/resource/**/pipeline/**/*.json
      • assets/resource/**/default_pipeline.json
      • assets/interface.json
      • agent/**/*.py
      • assets/table/**/*.json or intelligence_data/**
      • .claude/skills/pipeline-*
    • Relevant type labels are Pipeline, Option, Agent, Table, and Skill; labels may overlap.
    • List all commits in an appendix, including irrelevant commits.
  3. Scan historical change themes.

    • Use git log -G over the relevant pathspecs for:
      • "action": "Custom"
      • custom_action and @AgentServer.custom_action
      • custom_action_param
      • "next": and [JumpBack]
      • pipeline_override
      • enable / enabled
      • OCR, TemplateMatch, ColorMatch, color_filter
      • run_task(, run_recognition(, get_node_data(
    • Use these counts as navigation aids, not as the final conclusion.
  4. Parse the target tree.

    • Load every target pipeline JSON and count files, nodes, action types, recognition types, next entries, and [JumpBack] entries.
    • Extract action: Custom nodes with custom_action and custom_action_param.
    • Parse agent/**/*.py with Python ast. Walk both ast.ClassDef and ast.FunctionDef decorator lists because Maa projects commonly register CustomAction implementations by decorating classes. Extract:
      • @AgentServer.custom_action("Name")
      • context.run_task("Node")
      • context.run_recognition("Node")
      • context.get_node_data("Node")
    • Build a Pipeline node -> custom_action -> Python registration table and explicitly list missing registrations.
    • Parse assets/interface.json for option/task counts and pipeline_override usage.
  5. Review key commits.

    • Always sample major introduction/refactor/fix commits found by history, especially commits that introduce CustomAction, new pipeline files, options, ColorMatch/color_filter, or skill updates.
    • Use git show --stat --oneline <commit> plus targeted git show <commit>:<path> reads.
    • Explain what the commit teaches, not just which files changed.
  6. Validate the target.

    • Run JSON parsing on all pipeline files.
    • If a resource checker exists, run it against the target commit. For this repo family, prefer:
      python tools\ci\check_resource.py assets\resource\base
      
    • If checking an un-checked-out target commit, create a temporary detached worktree, run validation there, then remove the worktree. Verify the temp path before recursive deletion.
    • Note that resource loading may not detect missing Python CustomAction registrations; report both results separately.
  7. Write the report.

    • Prefer docs/zh_cn/develop/pipeline_history_audit.md in the target repo if that path exists; otherwise use docs/pipeline_history_audit.md.
    • Include:
      • Method and target commit
      • Coverage stats
      • Historical keyword counts
      • Current pipeline/custom/option asset snapshot
      • Custom mapping table
      • Key timeline
      • Findings by subsystem
      • Skill improvement recommendations
      • Validation results
      • Full commit index appendix
      • Registered custom action appendix

Report Judgement Rules

  • Do not claim "all Custom nodes are valid" unless every custom_action has a matching decorator in the target tree.
  • Do not treat context.run_task() result .nodes as proof of a hit. Prefer completed or recognition.hit when describing good patterns.
  • Treat pipeline_override as a merge into existing nodes; flag cases where the target node is missing or Python reads a different field path.
  • Call out enable vs enabled explicitly. Recommend compatibility helpers only when history already uses both.
  • Prefer JSON state machines (next + [JumpBack]) for finite UI flows. Reserve Python orchestration for runtime loops, counters, event libraries, screenshot parsing, and business decisions.
  • For OCR stability, look for ROI narrowing, expected text changes, ColorMatch, and color_filter before recommending TemplateMatch.
  • Distinguish resource loading from end-to-end execution. A resource check can pass while CustomAction registration is missing.

Useful Commands

git -C <repo> status --short
git -C <repo> rev-list --count <target>
git -C <repo> log --reverse --date=short --format="%H%x00%h%x00%ad%x00%s" <target>
git -C <repo> diff-tree --root --no-commit-id --name-status -r <commit>
git -C <repo> log --format=%H -G'"action"\s*:\s*"Custom"' <target> -- assets/resource agent assets/interface.json
git -C <repo> show --stat --oneline <commit>
git -C <repo> show <target>:assets/interface.json

When generating analysis scripts, keep them temporary unless the user asks for a reusable script. Do not leave generated helper scripts in the repo.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Generate MaaFramework Pipeline nodes and recognition snippets from screenshots or observed UI state. Use for OCR node generation, ROI sweep, choosing TemplateMatch/OCR/ColorMatch/CustomRecognition, preserving target-file schema style, and designing `next`/`[JumpBack]` links before merging generated nodes into pipeline JSON.

中文简介正在准备中。当前显示原文说明。

KhazixW2/MaaGumballs692026年10月15日 更新

生成 MaaFramework Pipeline 项目的可交互状态机图谱。当用户想"看 Pipeline 节点关系"、"画状态机图"、"画 Mermaid 图"、"看 node 间关系"、"找孤立节点 / orphan node"、"看 Python 怎么驱动 Pipeline"、"看 interface.json 入口"、"调试跨文件 next 引用"、"重构前理清架构" 时使用。**任何涉及 MaaFramework 节点关系可视化的需求都用这个 skill**,即便用户没明确说"画图"。

中文简介正在准备中。当前显示原文说明。

KhazixW2/MaaGumballs692026年10月15日 更新

Universal Pipeline JSON 编写指南。基于 MaaFramework Pipeline 协议,提供节点命名、识别算法、动作类型、流程控制、可复用节点等编码规范与模式参考。在编写、修改或审查 Pipeline JSON、设计节点流程、使用 TemplateMatch/OCR/Custom 识别或 Click/Swipe 动作时使用。

中文简介正在准备中。当前显示原文说明。

KhazixW2/MaaGumballs692026年10月15日 更新

Add runtime UI options (select/checkbox/switch/input) to MaaFramework option surfaces such as `assets/interface.json` or `assets/resource/tasks/**/*.json`. Use when adding a user-facing toggle, selector, checkbox, or input; wiring options to `pipeline_override`; aligning option paths with Python `context.get_node_data()` or CustomAction params; or reviewing option behavior across Pipeline JSON and Python.

中文简介正在准备中。当前显示原文说明。

KhazixW2/MaaGumballs692026年10月15日 更新

Test and validate MaaFramework Pipeline JSON, recognition nodes, action nodes, CustomAction/CustomRecognition wiring, resource loading, and end-to-end task behavior. Use when running `run_pipeline`, checking OCR/TemplateMatch/ColorMatch ROI, validating `context.run_task()` results, auditing `action: Custom` or `recognition: Custom` registrations, or choosing the right resource-check command.

中文简介正在准备中。当前显示原文说明。

KhazixW2/MaaGumballs692026年10月15日 更新

查看 KhazixW2 的全部技能

报告此技能的问题