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

debug-tag-clear

Skill2 starsChanged 5 months agoMITView on GitHub

Use when the user asks to remove temporary dedicated debug logs by tag after a bug is fixed, including requests named debugTagClear, "清理调试 tag", "把调试日志 tag 清除掉", "去掉刚才加的日志", or "删掉专属日志". Guides Codex to remove debug-only logs while preserving the real fix and tests.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    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 remove temporary debug logs added for a prior investigation.

    line 10
  2. Distinctive:

    Search the whole workspace for:

    line 15
  3. Distinctive:

    Remove only debug-only lines:

    line 20
  4. Distinctive:

    Do not revert business logic, state handling, tests, resource changes, or user edits.

    line 24
  5. Distinctive:

    Check staged and unstaged diffs.

    line 26
  6. Distinctive:

    Run the narrowest relevant test or compile check when practical.

    line 27
  7. Distinctive:

    Use project-appropriate paths and the actual tag:

    line 31
  8. Distinctive:

    If the working tree version is correct but the staged version still contains debug logs, stage the corrected files rather than resetting …

    line 39

≈ “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 Clear

Use this skill to remove temporary debug logs added for a prior investigation. The goal is to eliminate debug-only code without losing the business fix, tests, comments, or unrelated user changes.

Workflow

  1. Confirm the tag or infer it from recent context. If uncertain, search likely debug tag names before editing.
  2. Search the whole workspace for:
    • the fixed tag string
    • helper methods created only for those logs
    • imports used only by those logs
  3. Inspect diffs before editing. Separate debug-only code from real fixes and tests.
  4. Remove only debug-only lines:
    • log statements using the tag
    • now-unused logging imports
    • debug summary/helper methods added only for log formatting
  5. Do not revert business logic, state handling, tests, resource changes, or user edits.
  6. Re-run the tag search after editing. It must return no matches unless the user explicitly wants references retained.
  7. Check staged and unstaged diffs. If earlier debug logs are staged, update the staged content so a later commit will not include them.
  8. Run the narrowest relevant test or compile check when practical.

Recommended Commands

Use project-appropriate paths and the actual tag:

rg -n "CastCloseDebug|debugDeviceSummary|debugDisconnectSummary" .
git diff
git diff --cached

If the working tree version is correct but the staged version still contains debug logs, stage the corrected files rather than resetting unrelated work:

git add path/to/changed-file.kt

Finish Criteria

  • Report that the tag search has no matches.
  • List the remaining intended files if business changes are still present.
  • Mention what validation was run, or say clearly if validation was not run.

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.