add-doc-ftr
Capture structured documentation from conversation context - decisions, technical references, discussion summaries, how-to guides, and architecture docs. Auto-structures content, generates tags, and writes to .things/ for search and cross-reference.
What this skill does
<purpose>
Capture a structured document from the current conversation context. Automatically determines the best document structure (decision doc, technical reference, discussion summary, how-to guide, or architecture doc), generates tags for discoverability, and writes to `.things/for-the-record/docs/`. See `references/doc-format.md` for the frontmatter schema and document structures.
</purpose>
<steps>
<step id="load-config" number="1">
<description>Load Configuration</description>
<load-config>
<action>Resolve the user's home directory.</action>
<command language="bash" output="home" tool="Bash">echo $HOME</command>
<constraint>Never pass `~` to the Read tool.</constraint>
<read path="<home>/.things/config.json" output="config" />
<if condition="config-missing">Tell the user: "Run `/things:setup-things` first." Then stop.<exit /></if>
<read path="<home>/.things/for-the-record/preferences.json" output="preferences" />
<if condition="preferences-missing">Tell the user: "Run `/setup-ftr` first." Then stop.<exit /></if>
</load-config>
</step>
<step id="parse-arguments" number="2">
<description>Parse Arguments</description>
<action>Parse `$ARGUMENTS` for:</action>
- **topic**: The subject to document (everything that isn't a flag)
- **--detailed**: Override detail level to `detailed`
- **--tags tag1,tag2**: Explicit tags to include (comma-separated)
<action>Set `detail_level` from `--detailed` flag or fall back to `preferences.default_detail_level`.</action>
</step>
<step id="gather-context" number="3">
<description>Gather Context from Conversation</description>
<action>Search the conversation history for content relevant to the topic. Scope to the topic if one was provided.</action>
<constraint>
What counts as documentable context:
- Technical discussions, decisions, architecture plans
- Problem-solving sessions with conclusions
- How-to walkthroughs or setup procedures
- Design evaluations with tradeoffs
- Configuration or integration details
- Explanations of systems, patterns, or approaches
</constraint>
<if condition="no-useful-context">
<ask-user-question>
<question>I don't see relevant context in our conversation for "{topic}". What would you like to document?</question>
</ask-user-question>
</if>
<if condition="topic-not-provided-and-context-ambiguous">
<ask-user-question>
<question>What would you like to capture as a document? I can see a few threads in our conversation.</question>
</ask-user-question>
</if>
</step>
<step id="choose-structure" number="4">
<description>Choose Document Structure</description>
<action>Based on the gathered context, auto-choose the best document structure:</action>
| Content Pattern | Structure |
|----------------|-----------|
| Weighed options, chose an approach | Decision Doc: Context → Options → Evaluation → Decision → Rationale |
| Explained a system, API, or tool | Technical Reference: Overview → Details → Usage → Caveats |
| Discussed a topic, reached conclusions | Discussion Summary: Topic → Key Points → Conclusions → Open Questions |
| Walked through steps to accomplish something | How-To Guide: Goal → Prerequisites → Steps → Verification |
| Designed a system or component | Architecture Doc: Overview → Components → Data Flow → Constraints |
<constraint>If the content doesn't clearly fit one structure, pick the closest match. Don't ask the user to choose — the auto-selection should be good enough. If genuinely ambiguous between two, briefly mention which you chose and why.</constraint>
</step>
<step id="compose-document" number="5">
<description>Compose the Document</description>
<action>Write the document body using the chosen structure.</action>
<constraint>
Detail level controls depth:
- **concise**: Key points, decisions, outcomes. 1-2 paragraphs per section. Code blocks only when essential. Strip tangential discussion.
- **detailed**: Full reasoning chains, all alternatives discussed, complete code blocks, edge cases, caveats, and context that future-you needs. Preserve the richness of the conversation.
</constraint>
<constraint>Preserve specificity. "Configured app's prompt routing to use XML workflow tags" is better than "set up the system." Capture project names, tool names, version numbers, file paths, and configuration details.</constraint>
</step>
<step id="generate-tags" number="6">
<description>Generate Tags</description>
<if condition="preferences.auto_tag == true">
<action>Auto-generate tags by combining:</action>
- Technologies and tools mentioned (e.g., `rust`, `python`, `claude-code`)
- Domain keywords (e.g., `architecture`, `security`, `performance`)
- Activity type (e.g., `decision`, `reference`, `how-to`)
- Project names mentioned
- Any explicit `--tags` from arguments
<action>Read existing `<home>/.things/for-the-record/tags.json` and cross-reference for consistency. Prefer existing tag spellings over new variations (e.g., use `claude-code` if it exists rather than creating `claude_code`).</action>
<action>Also check `<home>/.things/tags/index.json` (central tag index) for cross-plugin tag consistency.</action>
</if>
<if condition="preferences.auto_tag == false">
<action>Use only explicit `--tags` from arguments. If none provided, ask.</action>
</if>
<ask-user-question>
<question>Here are the generated tags for this document. Add, remove, or modify:</question>
<option>Looks good</option>
<option-with-text-input>Make changes</option-with-text-input>
</ask-user-question>
</step>
<step id="generate-filename" number="7">
<description>Generate Filename</description>
<action>Generate filename: `<YYYY-MM-DD>-<slugified-topic>.md`</action>
<constraint>Slugify: lowercase, replace spaces and special chars with hyphens, collapse multiple hyphens, trim to reasonable length (~60 chars max for the slug portion).</constraint>
<action>Check if file already exists at `<home>/.things/for-the-record/docs/<filename>`.</action>
<if condition="file-exists">
<ask-user-question>
<question>A document with this name already exists. What would you like to do?</question>
<option>Replace it</option>
<option-with-text-input>Use a different name</option-with-text-input>
</ask-user-question>
</if>
</step>
<step id="write-document" number="8">
<description>Write Document</description>
<write path="<home>/.things/for-the-record/docs/<filename>">
<constraint>Use the frontmatter schema from `references/doc-format.md`.</constraint>
<template name="document">
```markdown
---
title: "<title>"
date: <YYYY-MM-DD>
description: "<1-2 sentence summary>"
detail_level: "<concise|detailed>"
source_type: "conversation"
tags: [<tags>]
---
<document body using chosen structure>
```
</template>
</write>
</step>
<step id="rebuild-index" number="9">
<description>Rebuild Index</description>
<constraint>The things PostToolUse hook automatically dispatches `rebuild-index.py` via the registry after writing a doc file. No manual rebuild needed.</constraint>
<if condition="hook-did-not-fire">The rebuild can be run manually:
<command language="bash" tool="Bash">python3 <plugin_root>/scripts/rebuild-index.py $HOME/.things</command>
</if>
</step>
<step id="git-workflow" number="10">
<description>Handle Git Workflow</description>
<git-workflow>
<action>Pull latest before committing.</action>
<command language="bash" tool="Bash">git -C <home>/.things pull --rebase 2>/dev/null || true</command>
<action>Read git workflow from `config.json` (`git.workfRelated in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.