loom-doc-first
Ensures documentation is updated before finalizing project changes.
Install
mkdir -p .claude/skills/loom-doc-first && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13642" && unzip -o skill.zip -d .claude/skills/loom-doc-first && rm skill.zipInstalls to .claude/skills/loom-doc-first
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Enforce Loom's documentation-first workflow for any task that changes code, config, interfaces, architecture, data flow, or runtime behavior. Use when working in the Loom repo to resolve repo root dynamically, detect current version from README (README-first), and require synchronized updates under DOCUMENTS/<version>/ before completion for core changes.Key capabilities
- →Resolve the repository root dynamically.
- →Detect the current version from the README file.
- →Classify changes as core or minor.
- →Enforce documentation synchronization for core changes.
- →Confirm all applicable checks before final response.
How it works
The skill dynamically resolves the repository root and parses the current version from the README.md. It then classifies the change level and enforces documentation updates for core changes.
Inputs & outputs
When to use loom-doc-first
- →Updating architecture docs
- →Documenting CLI changes
- →Syncing repo documentation
About this skill
Loom Documentation-First Guardrail
Apply this workflow before finishing any Loom task that may change project behavior or semantics.
Workflow
1) Resolve repository root dynamically (no hardcoded paths)
Resolve repo_root in this exact order:
- Run
git rev-parse --show-toplevel. - If that fails, walk upward from current working directory until finding a directory that contains both:
README.mdDOCUMENTS/
- If still unresolved, stop and report: cannot determine repository root.
Derived paths:
docs_root = <repo_root>/DOCUMENTSreadme_path = <repo_root>/README.md
2) Detect current version from README (README-first)
Parse README.md status/version text. Prefer explicit status lines like:
Early development (v0.1)- any
(...vX.Y...)pattern
If no parseable version exists, stop and report: current version cannot be determined from README.
Set:
current_version = parsed value(for examplev0.1)target_docs_dir = <repo_root>/DOCUMENTS/<current_version>
If target_docs_dir does not exist, stop and report: missing versioned docs directory.
3) Classify change level
Classify the requested or implemented change before completion.
Core changes (mandatory docs update):
- Interface or CLI behavior change
- Architecture or module responsibility change
- Data flow or protocol change
- Config semantic or default behavior change
- Runtime behavior change visible to users/operators
Minor changes (reminder only):
- Comment-only updates
- Typo or wording fixes
- Formatting or layout-only edits
- Non-semantic refactor with no behavior change
When uncertain, treat as core.
4) Enforce documentation sync
For core changes:
- Require at least one updated file under
target_docs_dir. - Ensure docs include:
- what changed
- impact scope
- code/command/config touchpoints
- If docs are not updated, block completion and request doc sync first.
For minor changes:
- Allow completion without doc edits.
- Explicitly state that change is minor and did not trigger mandatory documentation sync.
5) Use completion checklist
Before final response, confirm all applicable checks:
repo_rootresolved dynamicallycurrent_versionparsed from READMEtarget_docs_dirresolved and exists- core change: documentation updated in versioned docs path
- response includes
doc path + summary + impact pointswhen docs changed
6) v0.1 recommendation note (non-blocking)
When current_version = v0.1 and the task involves architecture decisions under DOCUMENTS/v0.1:
- Prefer checking
DOCUMENTS/v0.1/建议.mdfirst, if the file exists. - Treat
DOCUMENTS/v0.1/建议.mdas the single source of truth for recommendation content. - Keep this skill at reference/guardrail level; do not duplicate or maintain detailed recommendation body here.
- Treat entries in
建议.mdas recommended practices, not hard constraints. - If a recommendation conflicts with real constraints, it may be skipped; add a brief reason in related docs when applicable.
- Do not mark task completion as blocked solely because a recommendation in
建议.mdwas not followed.
This note does not replace mandatory documentation sync rules for core changes in Step 4.
Output Contract
When this skill is active, report these fields in the final summary:
Version: detected version from READMEDocs Directory: resolved versioned docs pathChange Level:coreorminorwith one-line rationaleDoc Sync: done/blocked/waived (with reason)
If blocked, do not present the task as completed.
When not to use it
- →When the task does not involve changes to code, config, interfaces, architecture, data flow, or runtime behavior.
- →When the task is a minor change like comment-only updates or typo fixes.
Limitations
- →The current version must be parseable from the README.md.
- →The target documentation directory must exist.
- →The skill does not replace mandatory documentation sync rules for core changes.
How it compares
This workflow automates the detection of project root, version, and change classification, ensuring documentation updates are synchronized with core changes, unlike a manual process that might miss these steps.
Compared to similar skills
loom-doc-first side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| loom-doc-first (this skill) | 0 | 3mo | No flags | Intermediate |
| deepwiki-rs | 25 | 9mo | Review | Intermediate |
| repo-research-analyst | 1 | 6mo | Review | Intermediate |
| c4-component | 1 | 4mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
deepwiki-rs
sopaco
AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation. Use when Claude needs to analyze source code, understand software architecture, generate technical specs, or create professional documentation from any programming language.
repo-research-analyst
parcadei
Analyze repository structure, patterns, conventions, and documentation for understanding a new codebase
c4-component
sickn33
Expert C4 Component-level documentation specialist. Synthesizes C4 Code-level documentation into Component-level architecture, defining component boundaries, interfaces, and relationships. Creates component diagrams and documentation. Use when synthesizing code-level documentation into logical components.
agent-pseudocode
ruvnet
Agent skill for pseudocode - invoke with $agent-pseudocode
spec
matteocervelli
>
cs-arch
wildlily1021
维护 `codestable/architecture/` 这份只记现状的系统地图,三种模式 update / check / backfill。触发:用户说"刷新 architecture"、"做架构检查"、"补这个模块的架构文档"、"方案和代码对得上吗",或 feature 阶段需要先做架构动作。不写未来规划(走 cs-roadmap)。