Creates or updates documentation in a type-agnostic manner by dynamically loading type-specific context at runtime
Creates or updates documentation by dynamically loading type-specific templates and context. Used when writing single documents after validation passes.
/plugin marketplace add fractary/claude-plugins/plugin install fractary-docs@fractaryThis skill inherits all available tools. When active, it can use any tool Claude has access to.
scripts/render-template.shscripts/version-bump.shscripts/write-doc.shPurpose: Create or update documentation in a type-agnostic manner by dynamically loading type-specific context.
Architecture Pattern: Operation-specific skill (3-layer architecture)
types/{doc_type}/Key Principle: You handle WRITE operations (CREATE + UPDATE) for ANY doc_type by loading the appropriate type context at runtime. </CONTEXT>
<CRITICAL_RULES>
Type Context Loading
plugins/docs/types/{doc_type}/Single Document Focus
No Embedded Operations
Context Bundle Handling
Dual-Format Support
Version Management
updated timestampOptional parameters:
version - Override version (default: auto-increment for update, 1.0.0 for create)author - Document authortags - Array of tags
</INPUTS>
Load Type Context
plugins/docs/types/{doc_type}/template.mdplugins/docs/types/{doc_type}/schema.jsonplugins/docs/types/{doc_type}/standards.mdExtract Variables from Context Bundle
Render Template
{{variables}} with extracted valuesGenerate Dual-Format (if applicable)
scripts/write-doc.sh to write README.md../../_shared/lib/dual-format-generator.shWrite Files
Return Result
{
"status": "success",
"operation": "create",
"doc_type": "{doc_type}",
"files_created": ["README.md", "{doc_type}.json"],
"file_path": "{absolute_path}",
"version": "1.0.0"
}
Load Existing Document
Load Type Context
Merge Updates
Version Bump
scripts/version-bump.shupdated timestampversion in frontmatterRender Updated Content
Write Files
Return Result
{
"status": "success",
"operation": "update",
"doc_type": "{doc_type}",
"files_updated": ["README.md", "{doc_type}.json"],
"file_path": "{absolute_path}",
"version": "1.0.1",
"changes": ["Updated authentication section", "Added new endpoint parameter"]
}
If any step fails:
{
"status": "error",
"operation": "{create|update}",
"error": "Description of what failed",
"stage": "{load_context|extract_variables|render|write}",
"file_path": "{path_if_available}"
}
</WORKFLOW>
<COMPLETION_CRITERIA> You are done when:
You are NOT responsible for:
The calling skill (docs-manager-skill) will use this result to:
After successful write operation, output:
✅ COMPLETED: doc-writer
Operation: {create|update}
Doc Type: {doc_type}
Files: {file_list}
Version: {version}
Path: {file_path}
───────────────────────────────────────
Next: Caller should invoke doc-validator for validation
</DOCUMENTATION>
<ERROR_HANDLING> Common errors to handle:
Type Context Missing:
Error: Type context not found for '{doc_type}'
Expected: plugins/docs/types/{doc_type}/template.md
Action: Verify doc_type is valid
Template Rendering Failed:
Error: Failed to render template
Missing variables: {variable_list}
Action: Check context_bundle has required data
File Write Failed:
Error: Cannot write to {file_path}
Reason: {permission|directory_missing|disk_full}
Action: Check permissions and disk space
Version Bump Failed:
Error: Invalid version format in existing document
Current version: {current}
Action: Fix version field in frontmatter
</ERROR_HANDLING>
<NOTES> ## Template Variable ExtractionVariables are extracted from context_bundle with this priority:
Templates use Mustache syntax:
{{variable}} - Simple substitution{{#section}}...{{/section}} - Conditional rendering (if truthy){{^section}}...{{/section}} - Inverted (if falsy){{#array}}{{.}}{{/array}} - Loop over arrayThe template renderer should support all Mustache features.
A doc_type requires dual-format if its schema.json includes:
{
"dual_format": true,
"json_schema": {...}
}
The standards.md file is informational - it guides content generation but doesn't enforce validation. The doc-validator skill enforces standards during validation. </NOTES>
Use when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.