agentleFS
midFangmidFang/ai-agent-skills-workflow/debug-tag-add/SKILL.md

debug-tag-add

Skill2 starsChanged 5 months agoMITView on GitHub

Use when the user asks to add temporary dedicated debug logging with a fixed tag, including requests named debugTagAdd, "加调试 tag", "加专属日志 tag", "固定 tag 调试", or "加日志方便给你日志排查". Guides Codex to add scoped, removable, high-signal logs for reproducing and diagnosing a specific bug.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill to add temporary diagnostic logs for one specific issue.

    line 10
  2. Distinctive:

    Add logs only at decision boundaries that can explain the bug:

    line 16
  3. Distinctive:

    Keep logs temporary and searchable.

    line 22
  4. Distinctive:

    Avoid logging secrets, tokens, cookies, request bodies with personal data, full URLs with credentials, or large binary/text payloads.

    line 23
  5. Distinctive:

    Prefer existing project logging helpers and style.

    line 24
  6. Distinctive:

    Run a search for the tag before finishing so the user knows exactly what to filter in Logcat or other logs.

    line 25

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Debug Tag Add

Use this skill to add temporary diagnostic logs for one specific issue. The goal is to make user-provided logs enough to locate the missed branch or wrong state, while keeping the change easy to remove later.

Workflow

  1. Identify the exact bug scenario, expected behavior, actual behavior, and the state machine or entry points involved.
  2. Choose one fixed tag for the whole investigation. Prefer a short issue-specific tag such as CastCloseDebug; if the user provides a tag, use it exactly.
  3. Add logs only at decision boundaries that can explain the bug:
    • state/event received
    • target/session matching result
    • key flags used by branching logic
    • error code/message/description
    • final branch/action chosen
  4. Keep logs temporary and searchable. Use the same tag string in every added log line.
  5. Avoid logging secrets, tokens, cookies, request bodies with personal data, full URLs with credentials, or large binary/text payloads.
  6. Prefer existing project logging helpers and style. Do not introduce a new logging framework.
  7. Run a search for the tag before finishing so the user knows exactly what to filter in Logcat or other logs.

Log Shape

Each log should answer: "where am I, which object/session is this, what condition values matter, and what branch will happen?"

Good examples:

logD(
    "CastCloseDebug",
    "start bridge state: type=${state::class.simpleName}, " +
        "matchesCurrentTarget=$matchesCurrentTarget, belongsToCurrentTarget=$belongsToCurrentTarget, " +
        "errorCode=${state.error?.errorCode}, showDialog=${state.showDialog}",
)
logD(
    "CastCloseDebug",
    "global disconnected: deviceId=${deviceId.orEmpty()}, " +
        "wasConnected=$wasConnected, hadEstablishedSession=$hadEstablishedSession, " +
        "willShowDeviceClosed=$shouldShowDeviceClosedDialog",
)

Finish Criteria

  • Tell the user the fixed tag to filter.
  • Mention the main files or code paths instrumented.
  • Make clear the logs are temporary and should be removed after the issue is confirmed fixed.

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.