init skill
Writes or updates a tech debt operations section in CLAUDE.md to centralize debt disciplines and quality commands.
- GitHub stars
- 9
- Files
- 1
- Last commit
- Nov 12, 2026
- License
- MIT
- Allowed tools
- 4
What does the init skill do?
init writes or updates a tech debt operations section in CLAUDE.md to centralize debt disciplines and quality commands.
Summary generated from the skill's SKILL.md.
About the init skill
Centralizing technical debt management and quality command documentation within a project is what this skill enables. It automates the creation or updating of a specific tech debt operations section inside a CLAUDE.md file, ensuring teams have a single source of truth for debt disciplines and cached quality commands. This is particularly useful for developers working in repositories that use the Claude Code plugin to track architectural decisions and feedback.
An agent uses this skill by reading cached command lists and directory paths from plugin data locations, such as CLAUDE_PLUGIN_DATA or standard home directory paths. It then uses Read, Write, Edit, and Bash tools to modify the CLAUDE.md file. The process is idempotent, meaning it only targets the managed section and leaves the rest of the file untouched. It relies on specific markers to identify where to insert or replace content, ensuring that existing documentation remains intact while the debt-ops section stays current with the latest repository state.
What an agent can do with it
- 1Initialize debt documentationCreate a new CLAUDE.md file containing the tech debt operations section if it does not already exist.
- 2Refresh existing debt sectionsUpdate the tech debt section in an existing CLAUDE.md file without altering any other parts of the document.
- 3Sync quality commandsPopulate the documentation with cached quality commands and directory paths discovered during the session.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the init skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the init skill in Plugin
/plugin marketplace add bcanfield/agentic-tech-debt /plugin install debt-ops@agentic-tech-debt
Install the init skill in Claude Code
~/.claude/skills/init/SKILL.md
$ npx degit bcanfield/agentic-tech-debt/claude-code/skills/init ~/.claude/skills/initInstall the init skill in Claude Code (project)
.claude/skills/init/SKILL.md
$ npx degit bcanfield/agentic-tech-debt/claude-code/skills/init .claude/skills/initInstall the init skill in Codex
~/.agents/skills/init/SKILL.md
$ npx degit bcanfield/agentic-tech-debt/claude-code/skills/init ~/.agents/skills/initInstall the init skill in Gemini CLI
~/.gemini/skills/init/SKILL.md
$ npx degit bcanfield/agentic-tech-debt/claude-code/skills/init ~/.gemini/skills/initInstall the init skill in Claude.ai
npx degit bcanfield/agentic-tech-debt/claude-code/skills/init init && zip -r init.zip init # claude.ai → Customize → Skills → + → Create skill → Upload a skill → init.zip
SKILL.md
View on GitHub/debt-ops:init
Write or update a ## Tech debt operations section in ./CLAUDE.md. Idempotent — only the managed section changes.
1. Read the cached commands
TOPLEVEL=$(git rev-parse --show-toplevel)
REPO_HASH=$(printf '%s' "$TOPLEVEL" | shasum | cut -c1-12)
# Locate this repo's plugin cache. CLAUDE_PLUGIN_DATA is set in hook
# subprocesses but NOT in the skill's bash env, so glob the standard
# Claude Code plugin-data dirs and fall back to the legacy cache path.
CACHE_DIR=""
for D in \
${CLAUDE_PLUGIN_DATA:+"$CLAUDE_PLUGIN_DATA/cache/$REPO_HASH"} \
"$HOME/.claude/plugins/data"/debt-ops*/cache/"$REPO_HASH" \
"$HOME/.cache/debt-ops/cache/$REPO_HASH"; do
[ -d "$D" ] && { CACHE_DIR="$D"; break; }
done
LIST="$CACHE_DIR/feedback.list"
[ -n "$CACHE_DIR" ] && [ -f "$LIST" ] && cat "$LIST"
# Detected ADR/registry dirs (ADR 0006/0009). Fall back to the co-located
# defaults if the cache files aren't written yet.
ADR_DIR=$( [ -s "$CACHE_DIR/adr-dir" ] && cat "$CACHE_DIR/adr-dir" || echo "docs/adr" )
REGISTRY_DIR=$( [ -s "$CACHE_DIR/registry-dir" ] && cat "$CACHE_DIR/registry-dir" || echo "docs/debt" )
echo "adr-dir: $ADR_DIR"
echo "registry-dir: $REGISTRY_DIR"
If the file doesn't exist, the SessionStart discovery prompt hasn't run yet. Tell the developer:
No cached quality commands yet. Start a new session so I can detect them, then re-run /debt-ops:init.
…and stop.
2. Compose the section (template)
Substitute {{COMMANDS}} with the cache contents verbatim, {{ADR_DIR}} with the detected adr-dir, and {{REGISTRY_DIR}} with the detected registry-dir (from step 1).
## Tech debt operations
<!-- this section is auto-managed by the debt-ops Claude Code plugin; safe to edit, run /debt-ops:init to regenerate -->
### Disciplines
1. The test for debt: would a future reader ask "why this way?" If yes, register via `/debt-ops:add` immediately — no prompt. This is judgment, not a marker scan: a `TODO`/`FIXME`/`HACK`/`XXX` is the obvious case, but an unmade decision, a stub, a loosened type, or a default picked "for now" all count even with no marker in the diff. Use `payoff_trigger: unknown` if unsure. Announce: `+1 entry: <slug> (drop?)`. Over-register freely; the developer drops with "drop it".
2. When making an architecturally significant change — a data model, public interface, security boundary, release pipeline, or a dep-manifest change that is a major-version bump or a *new* top-level dependency — draft an ADR under `{{ADR_DIR}}/` in Nygard format: a `# NNNN — Title` heading, `**Date:**` and `**Status:**` lines, then Context, Decision, Consequences, Alternatives, Payoff trigger. Create the directory if needed. Only draft an ADR when there are two credible alternatives; if you cannot list two, it is a comment, not an ADR. An ADR with a payoff trigger *is* deliberate debt — when you write one, also call `/debt-ops:add` so the registry entry mirrors the ADR (don't conclude "no markers, no debt").
3. Read entries under `{{REGISTRY_DIR}}/` before changing files they reference.
### Quality commands
These run after every edit under a 3 s budget per command. Edit freely; the plugin reads tolerantly. Lines starting with `#` are estimates/comments and are skipped at run time.
<!-- debt-ops:feedback v1 -->
{{COMMANDS}}
<!-- /debt-ops:feedback -->
3. Apply
- If
./CLAUDE.mddoesn't exist:Writeit with the section above as the entire file. - If
./CLAUDE.mdhas a## Tech debt operationssection:Editto replace exactly that section — from the heading through (but not including) the next##heading, or through EOF if no next heading. Leave every other byte unchanged. - If
./CLAUDE.mdexists without the section:Editto append the section after the last existing line, with a single blank line between.
4. Announce
charter updated: ./CLAUDE.md — disciplines + N quality commands
(N = count of non-comment, non-blank lines inside the marker block.)
Marker contract — do not deviate
<!-- debt-ops:feedback v1 -->is the open markerfeedback.pykeys on. Exact string; thev1is part of the marker.<!-- /debt-ops:feedback -->is the close marker.- The self-explaining
<!-- this section is auto-managed by … -->line is mandatory — a teammate without the plugin reads that to understand what they're seeing. - Never touch any byte outside the
## Tech debt operationssection.
Files in this skill
1init skill questions
How do I install the init skill in Claude Code?
Run npx degit bcanfield/agentic-tech-debt/claude-code/skills/init ~/.claude/skills/init. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the init skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
What happens if the CLAUDE.md file does not exist?
The skill will create a new CLAUDE.md file containing only the tech debt operations section.
What should I do if no cached quality commands are detected?
You should start a new session to allow the tool to detect the commands, then run the command again.