Skip to content
Back to skills

Document

ASecurity

Generate minimal documentation through parallel agents

  • 4 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added May 26, 2026
developmentdocumentation

Works with

  • terminal

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add bitcraft-apps/spec-first --skill document --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Document?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Document
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/bitcraft-apps-document/badge)](https://www.skillsdirectory.com/skills/bitcraft-apps-document)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: document
description: Generate minimal documentation through parallel agents
disable-model-invocation: true
argument-hint: "[SPECIFICATION_AND_IMPLEMENTATION_PATHS]"
---

# Document Command

Creates minimal, proportional documentation. Match doc weight to change weight.

## Usage
```
/sf:document [SPECIFICATION_AND_IMPLEMENTATION_PATHS]
```

---

## Project Context
- Implementation summary: !`test -f .claude/.sf/implementation-summary.md && head -20 .claude/.sf/implementation-summary.md || echo "none"`

## Input Resolution

**Input Resolution:**

1. If $ARGUMENTS provided: Use as artifact/implementation paths
2. Else if `.claude/.sf/spec.md` and `.claude/.sf/implementation-summary.md` exist: Use them
3. Else: Use **AskUserQuestion** tool to ask for artifact locations

## Execution

After input resolution, run agents in 3 batches:

**Batch 1 (Parallel):**
- Task: analyze-artifacts (maxTurns: 6) with requirements: $ARTIFACT_PATHS
- Task: analyze-implementation (maxTurns: 10) with requirements: $IMPLEMENTATION_PATHS
- Task: analyze-existing-docs (maxTurns: 6) (scans project for existing documentation inventory)

**Gate 1 — Post-Analysis:**
Check that each output file exists:
- `$SF_DIR/research/artifacts-summary.md`
- `$SF_DIR/research/implementation-summary.md`
- `$SF_DIR/research/docs-inventory.md`

Missing file = agent failed to run → halt pipeline, report which file(s) are missing, preserve existing output for inspection. Empty or whitespace-only file = valid "no docs needed" signal → pass. Write gate results to `$SF_DIR/research/gate-analysis.md` (pass/fail per file, warnings for files under 5 lines).

**Batch 2 (Parallel):**
- Task: create-technical-docs (maxTurns: 15) (reads $SF_DIR/research/artifacts-summary.md, $SF_DIR/research/implementation-summary.md)
- Task: create-user-docs (maxTurns: 15) (reads $SF_DIR/research/artifacts-summary.md, $SF_DIR/research/implementation-summary.md)

**Gate 2 — Post-Generation:**
For each generated doc, verify:
1. File exists (empty is acceptable — means the change didn't warrant that doc type)
2. No placeholder patterns: `TODO`, `TBD`, `PLACEHOLDER`, `[INSERT` (case-insensitive)

Block on: placeholder-only content. Empty files are valid — they mean the agent correctly determined no docs were needed. Write gate results to `$SF_DIR/research/gate-generation.md`.

**Batch 3:**
- Task: integrate-docs (maxTurns: 15) (reads docs-inventory.md to update existing files or create new ones)

**Gate 3 — Post-Integration:**
Verify integration completed. If no docs were updated or created, that's valid — report "no documentation changes needed" and finish cleanly. Write gate results to `$SF_DIR/research/gate-integration.md`.

Output: Documentation updates (if any) + terminal summary

## Gate Failure Behavior
On any gate failure: halt immediately, do not proceed to the next batch. Report which gate failed and why. Preserve output for inspection.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.