agentleFS
TencentCloudBaseTencentCloudBase/CloudBase-AI-Toolkit/skills/mcp-attribution-worktree/SKILL.md

mcp-attribution-worktree

Skill1.1k starsChanged 4 months agoMITView on GitHub

Triage, repair, and close MCP attribution issues from the local report API with evidence-driven decisions and isolated Worktrunk worktrees. Use this skill when Codex needs to process `tool` attribution issues and skills-related attribution issues, inspect related runs, decide whether the issue is actionable in `mcp/src` or `config/source/skills`, update attribution fields as `owner=codex`, and then complete the fix loop through GitHub issue tracking, worktree-based code changes, PR submission, and follow-up iteration when the problem is repairable.

  • Sends data out
  • Commits and pushes

Trending

More talk lately.about the whole repository

Dec 2025: 2 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 4 mentionsSep 2026: 5 mentionsOct 2026: 5 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the TencentCloudBase/CloudBase-AI-Toolkit repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about TencentCloudBase/CloudBase-AI-Toolkit

The biggest 5 of 18 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 18

Talked about on GitHub (18 times).

On GitHub · 18

13 more on GitHub

The file

Show its rules and text

We split this skill into the rules it gives an agent

55 rules. About 0 are common, 29 are distinctive, and 26 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈29

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 26

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to:

    line 12
  2. Very specific:

    update attribution issues with concise evidence, owner=codex, and links to external GitHub work

    line 17
  3. Distinctive:

    run a real post-PR evaluation when an evaluation interface is available, and use that result to decide whether another repair loop is needed

    line 21
  4. Very specific:

    Start with focused tool and skill backlog queries.

    line 32
  5. Very specific:

    Read at least one run's result and trace.

    line 35
  6. Very specific:

    Check the relevant implementation in mcp/src or config/source/skills before deciding whether the issue is actionable.

    line 36
  7. Distinctive:

    When the failure is caused by model misunderstanding, prefer repairs that translate repo-specific behavior into concepts the model already …

    line 37
  8. Distinctive:

    If the issue is actionable in repo code or skills content, do not stop at attribution triage.

    line 38
  9. Distinctive:

    If review comments, review decisions, or later evidence show the direction is wrong, start another focused iteration from the existing …

    line 39
  10. Distinctive:

    Update attribution fields through the report API after you have the right evidence, and update them again when the GitHub issue, PR, or …

    line 40
  11. Very specific:

    Before changing an attribution to resolved, run a closure preflight on the linked GitHub artifact again: reread the latest PR comments, …

    line 41
  12. Distinctive:

    When a real evaluation interface exists, run a post-PR evaluation and use the result plus the closure preflight to decide whether to …

    line 42
  13. Distinctive:

    Only stop after the issue is either clearly non-actionable or has been carried through the repair loop as far as the current environment …

    line 43
  14. Distinctive:

    When attribution evidence shows the model is failing because a tool or skill exposes repo-specific semantics in an unfamiliar way, prefer …

    line 67
  15. Distinctive:

    Keep model-facing guidance short and high-signal.

    line 70
  16. Distinctive:

    Prefer changing the tool description, parameter description, skill wording, or generated docs when that is enough to correct the model's …

    line 72
  17. Distinctive:

    Do not assume the model will infer hidden semantics from traces, backend behavior, or evaluator expectations.

    line 73
  18. Distinctive:

    Only update attribution issues through the local report API.

    line 77
  19. Very specific:

    Treat owner as fixed: always set it to codex when you patch an attribution.

    line 78
  20. Very specific:

    Before any new iteration, always inspect the latest attribution notes, externalUrl, linked GitHub issue or PR status, and any available PR …

    line 79
  21. Very specific:

    Before moving any issue to resolved, always perform a fresh closure sweep on the linked issue or PR after the latest push or evaluation has …

    line 80
  22. Very specific:

    Do not change resolutionStatus until you have read at least one related run's result and trace.

    line 81
  23. Very specific:

    Do not mark an issue resolved without clear closure evidence such as an existing GitHub issue, PR, merged fix, or a verified duplicate that …

    line 82
  24. Very specific:

    Do not mark an issue resolved if there are unread or unaddressed PR comments, review comments, review decisions, or issue comments that …

    line 83
  25. Very specific:

    Keep notes short but auditable.

    line 84
  26. Very specific:

    If the evidence is incomplete, keep the issue todo or move it to in_progress and explicitly state what is still missing.

    line 85
  27. Distinctive:

    When the likely root cause is model misunderstanding rather than backend behavior, first try to repair the model-facing contract: clearer …

    line 87
  28. Very specific:

    When the fix belongs to CloudBase skill content, edit config/source/skills/ as the source of truth.

    line 88
  29. Distinctive:

    Only stop at status-only attribution updates when the issue is non-actionable, blocked by missing evidence, blocked by missing Worktrunk, …

    line 89
  30. Distinctive:

    Do not use broad uncategorized backlog queries as the default source of work.

    line 90
  31. Distinctive:

    Prefer one sub-agent per issue when sub-agent support exists.

    line 92
  32. Very specific:

    If a repair is needed, use Worktrunk's wt workflow for the isolated worktree.

    line 93
  33. Distinctive:

    Never reuse the same worktree for multiple attribution issues.

    line 94
  34. Distinctive:

    Do not open or update GitHub issues until you have enough run evidence to explain the problem clearly.

    line 95
  35. Distinctive:

    If an issue already has a GitHub issue or PR, read its current state before starting a new branch or changing direction: open or closed …

    line 96
  36. Very specific:

    If a real evaluation interface is available, prefer leaving the attribution in_progress until the repaired branch or PR passes a fresh …

    line 98
  37. Distinctive:

    Do not claim validation success from reasoning alone.

    line 99
  38. Distinctive:

    Before starting a fresh diagnosis or code iteration for an attribution issue, complete this checklist in order:

    line 103
  39. Very specific:

    Read the attribution detail plus the latest notes.

    line 105
  40. Very specific:

    Read externalUrl if present.

    line 106
  41. Very specific:

    If externalUrl points to a GitHub issue, check whether it is open or closed and whether later comments changed the fix direction.

    line 107
  42. Very specific:

    If externalUrl points to a PR, check whether it is open, merged, closed, or superseded.

    line 108
  43. Distinctive:

    Read PR comments, review comments, and review decisions before deciding whether to continue the same branch or start a new iteration.

    line 109
  44. Very specific:

    Only after that, pick the representative run and continue into result, trace, and evaluation-trace.

    line 110
  45. Very specific:

    Before changing an attribution to resolved, complete this checklist in order even if you already did the normal preflight earlier:

    line 114
  46. Very specific:

    If new feedback exists, keep the attribution in_progress and continue the loop.

    line 119
  47. Distinctive:

    Only if there is no newer unresolved feedback, evaluate whether closure evidence is now strong enough.

    line 120
  48. Distinctive:

    If the issue was actionable, did I continue into GitHub issue / worktree / PR work instead of stopping at triage?

    line 144
  49. Distinctive:

    If there was already a PR or review thread, did I continue from that feedback instead of ignoring it?

    line 145
  50. Distinctive:

    If a real evaluation interface was available, did I run a fresh evaluation before treating the issue as closed?

    line 146
  51. Very specific:

    If I patched the attribution, did I keep the change limited to resolutionStatus, owner, notes, and externalUrl when relevant?

    line 148
  52. Distinctive:

    If I started a fix, does it live in its own Worktrunk worktree and branch?

    line 149
  53. Distinctive:

    If the issue was caused by model misunderstanding, did I reduce model-facing complexity by mapping repo-specific behavior to familiar …

    line 150
  54. Very specific:

    If I marked something resolved, is there explicit closure evidence?

    line 151
  55. Very specific:

    If I marked something resolved, did I re-read the latest PR comments, review comments, review decisions, and issue comments immediately …

    line 152

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

MCP Attribution Worktree

Process MCP and skills-related attribution issues as an auditable maintenance workflow instead of ad-hoc debugging.

What this skill does

Use this skill to:

  • fetch pending MCP and skills-related attribution issues from the local report API
  • inspect issue detail plus representative runs before making any status decision
  • map failures back to concrete mcp/src tools, config/source/skills, or classify them as environment / grader / duplicate noise
  • update attribution issues with concise evidence, owner=codex, and links to external GitHub work
  • isolate each actionable repair in its own Worktrunk worktree and branch
  • carry actionable issues through repo repair and PR creation instead of stopping at issue state updates
  • continue from existing GitHub issues or PRs when later review or evaluation feedback shows the first direction was incomplete or wrong
  • run a real post-PR evaluation when an evaluation interface is available, and use that result to decide whether another repair loop is needed

Do not use this skill for

  • generic bug fixing without attribution evidence
  • unrelated attribution categories that do not map to mcp/src or config/source/skills
  • bulk repo changes unrelated to a specific attribution issue
  • direct database or backend mutation outside the documented report API endpoints

Workflow

  1. Start with focused tool and skill backlog queries.
  2. Process one issue at a time. Never mix evidence, notes, or worktrees across issues.
  3. Run the existing-artifact preflight before choosing the representative run: read issue detail, current notes, existing externalUrl, and the state of any linked GitHub issue or PR. If a GitHub issue or PR already exists, treat it as part of the current state, not a finished endpoint.
  4. Read at least one run's result and trace. Prefer to also read evaluation-trace.
  5. Check the relevant implementation in mcp/src or config/source/skills before deciding whether the issue is actionable.
  6. When the failure is caused by model misunderstanding, prefer repairs that translate repo-specific behavior into concepts the model already knows well. Reuse familiar abstractions, canonical API names, and one safe example instead of adding long product-specific explanations.
  7. If the issue is actionable in repo code or skills content, do not stop at attribution triage. Open or link the matching GitHub issue, create a dedicated Worktrunk worktree, implement the fix, validate it, and prepare a PR.
  8. If review comments, review decisions, or later evidence show the direction is wrong, start another focused iteration from the existing GitHub issue or PR context and continue improving instead of treating the first PR as final.
  9. Update attribution fields through the report API after you have the right evidence, and update them again when the GitHub issue, PR, or evaluation result becomes available.
  10. Before changing an attribution to resolved, run a closure preflight on the linked GitHub artifact again: reread the latest PR comments, review comments, review decisions, and issue comments after the most recent code push or evaluation result.
  11. When a real evaluation interface exists, run a post-PR evaluation and use the result plus the closure preflight to decide whether to continue iterating or mark the issue closed.
  12. Only stop after the issue is either clearly non-actionable or has been carried through the repair loop as far as the current environment allows.

Common requests

  • "Automatically process the pending MCP attribution issues."
  • "Look at the tool and skills attribution backlog, fix the real issues, and update attribution with evidence."
  • "Find valuable MCP attribution problems and fix them in isolated worktrees."
  • "For each tool issue, decide whether it is a real mcp/src bug or just evaluation noise."
  • "Continue iterating on the existing issue or PR after review comments."
  • "After opening the PR, run a real evaluation and fix the next round if it still fails."

Routing

TaskRead
Run the report API triage flow and update attribution fields across tool and skills-related issuesreferences/report-api-workflow.md
Decide whether an issue is valuable and map it to mcp/src or config/source/skillsreferences/value-triage.md
Create GitHub issues, use Worktrunk, and repair the repo in isolationreferences/worktree-repair.md
Continue from review feedback or real evaluation results after a PR already existsreferences/iteration-loop.md
Trigger real evaluation runs and interpret the resultreferences/evaluation-verification.md
Dispatch one issue per worker and enforce closure-sweep rules in sub-agent promptsreferences/subagent-orchestration.md

Model-oriented repair heuristic

When attribution evidence shows the model is failing because a tool or skill exposes repo-specific semantics in an unfamiliar way, prefer repairs that reduce translation work for the model.

  • Map the behavior to concepts the model already knows well, such as MongoDB updateOne or updateMany, HTTP methods, SQL CRUD verbs, filesystem path conventions, or common SDK idioms.
  • Keep model-facing guidance short and high-signal. One canonical safe example is usually better than a long product-specific explanation.
  • Explicitly name dangerous defaults or footguns when they are easy for the model to miss, such as replacement vs partial update, destructive writes, ambiguous path resolution, or auth-sensitive side effects.
  • Prefer changing the tool description, parameter description, skill wording, or generated docs when that is enough to correct the model's mental model. Do not jump to implementation changes if the real gap is contract clarity.
  • Do not assume the model will infer hidden semantics from traces, backend behavior, or evaluator expectations. If a safe rule matters, state it directly where the model sees it.

Operating rules

  • Only update attribution issues through the local report API.
  • Treat owner as fixed: always set it to codex when you patch an attribution.
  • Before any new iteration, always inspect the latest attribution notes, externalUrl, linked GitHub issue or PR status, and any available PR comments or review decisions.
  • Before moving any issue to resolved, always perform a fresh closure sweep on the linked issue or PR after the latest push or evaluation has completed. Do not rely on an earlier preflight.
  • Do not change resolutionStatus until you have read at least one related run's result and trace.
  • Do not mark an issue resolved without clear closure evidence such as an existing GitHub issue, PR, merged fix, or a verified duplicate that already has external tracking.
  • Do not mark an issue resolved if there are unread or unaddressed PR comments, review comments, review decisions, or issue comments that arrived after the last time you inspected the linked artifact.
  • Keep notes short but auditable. Include the representative run, the main failing signal, and the code or tool signal that supports the conclusion.
  • If the evidence is incomplete, keep the issue todo or move it to in_progress and explicitly state what is still missing.
  • For a real and repairable issue in mcp/src or config/source/skills, the default expectation is full follow-through: attribution triage, GitHub issue linkage, isolated worktree repair, validation, and PR creation.
  • When the likely root cause is model misunderstanding rather than backend behavior, first try to repair the model-facing contract: clearer tool descriptions, safer parameter wording, skill guidance, canonical examples, and explicit warning about dangerous defaults.
  • When the fix belongs to CloudBase skill content, edit config/source/skills/ as the source of truth. Do not treat the root skills/ directory as the source for those external skills.
  • Only stop at status-only attribution updates when the issue is non-actionable, blocked by missing evidence, blocked by missing Worktrunk, or clearly outside MCP repo control.
  • Do not use broad uncategorized backlog queries as the default source of work. Only use them in explicit fallback mode when category labels are incomplete or the user asks for a full backlog sweep.
  • Items discovered through fallback broad queries must not enter the repair queue until run evidence clearly shows they belong to mcp/src or config/source/skills.
  • Prefer one sub-agent per issue when sub-agent support exists. Give each sub-agent ownership of exactly one issue. If sub-agents are unavailable, process issues serially and keep a strict one-issue-at-a-time context.
  • If a repair is needed, use Worktrunk's wt workflow for the isolated worktree. If wt is unavailable, stop and report that Worktrunk is missing instead of silently falling back to a shared checkout.
  • Never reuse the same worktree for multiple attribution issues.
  • Do not open or update GitHub issues until you have enough run evidence to explain the problem clearly.
  • If an issue already has a GitHub issue or PR, read its current state before starting a new branch or changing direction: open or closed status, latest comments, review decisions, and whether the linked work is already stale or superseded.
  • Review comments and post-PR evaluation failures are part of the same repair loop. Use them to drive another iteration instead of prematurely closing the attribution.
  • If a real evaluation interface is available, prefer leaving the attribution in_progress until the repaired branch or PR passes a fresh evaluation round.
  • Do not claim validation success from reasoning alone. Use the evaluation API and the final run result whenever that interface is available.

Required preflight

Before starting a fresh diagnosis or code iteration for an attribution issue, complete this checklist in order:

  1. Read the attribution detail plus the latest notes.
  2. Read externalUrl if present.
  3. If externalUrl points to a GitHub issue, check whether it is open or closed and whether later comments changed the fix direction.
  4. If externalUrl points to a PR, check whether it is open, merged, closed, or superseded.
  5. Read PR comments, review comments, and review decisions before deciding whether to continue the same branch or start a new iteration.
  6. Only after that, pick the representative run and continue into result, trace, and evaluation-trace.

Required closure preflight

Before changing an attribution to resolved, complete this checklist in order even if you already did the normal preflight earlier:

  1. Reopen the linked GitHub issue or PR.
  2. Re-read the latest top-level comments, review comments, and review decisions.
  3. Confirm whether any comment arrived after the latest code push, PR update, or evaluation result.
  4. If new feedback exists, keep the attribution in_progress and continue the loop.
  5. Only if there is no newer unresolved feedback, evaluate whether closure evidence is now strong enough.

Quick commands

curl -s 'http://127.0.0.1:5174/api/attributions?category=tool&resolutionStatus=todo&limit=50'
curl -s 'http://127.0.0.1:5174/api/attributions?category=skill&resolutionStatus=todo&limit=50'
curl -s "http://127.0.0.1:5174/api/attributions/<issueId>"
curl -s "http://127.0.0.1:5174/api/runs/<caseId>/<runId>/result"
curl -s "http://127.0.0.1:5174/api/runs/<caseId>/<runId>/trace"
curl -s "http://127.0.0.1:5174/api/runs/<caseId>/<runId>/evaluation-trace"
wt switch --create feature/attribution-<slug>
gh issue create --repo TencentCloudBase/CloudBase-MCP
gh pr view <number> --comments --repo TencentCloudBase/CloudBase-MCP
gh pr create --repo TencentCloudBase/CloudBase-MCP
curl -s -X POST http://127.0.0.1:5174/api/evaluations

Minimum self-check

  • Did I complete the existing-artifact preflight before starting a new diagnosis or code iteration?
  • Did I inspect at least one related run's result and trace before changing status?
  • Did I keep this issue isolated from every other issue?
  • Is the issue actually actionable in mcp/src, config/source/skills, or is it environment / grader noise?
  • If the issue was actionable, did I continue into GitHub issue / worktree / PR work instead of stopping at triage?
  • If there was already a PR or review thread, did I continue from that feedback instead of ignoring it?
  • If a real evaluation interface was available, did I run a fresh evaluation before treating the issue as closed?
  • Did I base the validation conclusion on the final evaluation result instead of my own guess?
  • If I patched the attribution, did I keep the change limited to resolutionStatus, owner, notes, and externalUrl when relevant?
  • If I started a fix, does it live in its own Worktrunk worktree and branch?
  • If the issue was caused by model misunderstanding, did I reduce model-facing complexity by mapping repo-specific behavior to familiar concepts and by explicitly naming dangerous defaults?
  • If I marked something resolved, is there explicit closure evidence?
  • If I marked something resolved, did I re-read the latest PR comments, review comments, review decisions, and issue comments immediately before closing it?

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.