doc-forms — community doc-forms, the-fold, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for Code Analysis Agents needing advanced documentation and annotation capabilities for source code introspection. A content-addressed homoiconic skill tree for agentic AI

osoleve osoleve
[5]
[2]
Updated: 2/24/2026

Agent Capability Analysis

The doc-forms skill by osoleve is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Perfect for Code Analysis Agents needing advanced documentation and annotation capabilities for source code introspection.

Core Value

Empowers agents to generate and manage searchable, introspectable annotations using homoiconic `(doc ...)` forms, enabling comprehensive content analysis and typed comments for improved code understanding and maintainability.

Capabilities Granted for doc-forms

Automating documentation generation for complex codebases
Creating targeted annotations for specific functions or variables
Introspecting code definitions using contextual `(doc ...)` forms

! Prerequisites & Limits

  • Requires Scheme-like syntax support
  • Limited to codebases utilizing `(doc ...)` form annotations
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

doc-forms

Install doc-forms, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

Doc Forms (Typed Comments)

The Fold uses (doc ...) forms for searchable, introspectable annotations that survive in source code.

Basic Syntax

Contextual (belongs to enclosing definition)

scheme
1(define (add x y) 2 (doc 'type (-> Int Int Int)) 3 (doc 'description "Adds two numbers") 4 (+ x y))

Targeted (names what it documents)

scheme
1(doc factorial 'type (-> Int Int)) 2(define (factorial n) 3 (if (= n 0) 1 (* n (factorial (- n 1)))))

Semantics

PropertyBehavior
ArgumentsNOT evaluated (pure metadata)
Return valuevoid — use in sequences, not value positions
NormalizationStripped — code with/without docs hashes identically
ExtractionTooling reads from source (lf-todo, lf-types)
Type authorityAuthoritative(doc f 'type ...) takes precedence over inference

Standard Tags

TagPurposeExample
'typeType signature(doc 'type (-> Int Int))
'descriptionHuman-readable description(doc 'description "Adds two numbers")
'paramParameter documentation(doc 'param 'x "The first operand")
'returnsReturn value description(doc 'returns "The sum")
'todoWork to be done(doc 'todo "Optimize for large inputs")
'fixmeKnown issue(doc 'fixme "Edge case with negative numbers")
'deprecatedDeprecation notice(doc 'deprecated "Use add-safe instead")
'sinceVersion introduced(doc 'since "1.2.0")
'seeRelated items(doc 'see 'subtract)
'noteImplementation note(doc 'note "Uses memoization internally")

Search Commands

After loading lattice/meta/docs.ss:

scheme
1(lf-todo) ; Find all todos in codebase 2(lf-types) ; Find all type annotations 3(docs-for 'symbol) ; Find docs for specific target 4(doc-stats) ; Count docs by tag

Type Checker Integration

Doc type annotations integrate with both the LSP and type inference:

ComponentBehavior
LSP hoverShows doc-declared types with highest priority
Type inferenceUses declared types via lookup-declared-type in core/types/infer.ss
Bridgeload-doc-types-into-checker! populates type checker from doc index

Example: Declaring Types for Inference

scheme
1;; The type checker will trust this annotation 2(doc my-complex-fn 'type (-> (List Int) (Maybe Int))) 3(define (my-complex-fn lst) 4 ;; Complex implementation... 5 )

Todos vs BBS Issues

Use CaseWhen to Use
(doc 'todo ...)Colocated with code, for localized improvements (performance, refactoring, cleanup)
BBS issueTracked work items, features, bugs, cross-cutting concerns, things needing scheduling

Rule of thumb: If it needs to be scheduled or tracked across sessions, use BBS. If it's a note-to-self next to the code, use (doc 'todo ...).

Examples

Full Function Documentation

scheme
1(define (binary-search vec target) 2 (doc 'type (-> (Vector Int) Int (Maybe Int))) 3 (doc 'description "Binary search for target in sorted vector") 4 (doc 'param 'vec "Sorted vector of integers") 5 (doc 'param 'target "Value to find") 6 (doc 'returns "Index wrapped in Just, or Nothing if not found") 7 (doc 'todo "Add bounds checking") 8 ;; implementation... 9 )

Deprecation

scheme
1(doc old-api 'deprecated "Use new-api instead. Will be removed in 2.0") 2(define (old-api x) (new-api x))

Module-Level Documentation

scheme
1;; At top of file 2(doc 'description "Matrix operations for linear algebra") 3(doc 'since "1.0.0") 4(doc 'see 'linalg/vec)

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is doc-forms?

Perfect for Code Analysis Agents needing advanced documentation and annotation capabilities for source code introspection. A content-addressed homoiconic skill tree for agentic AI

How do I install doc-forms?

Run the command: npx killer-skills add osoleve/the-fold/doc-forms. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for doc-forms?

Key use cases include: Automating documentation generation for complex codebases, Creating targeted annotations for specific functions or variables, Introspecting code definitions using contextual `(doc ...)` forms.

Which IDEs are compatible with doc-forms?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for doc-forms?

Requires Scheme-like syntax support. Limited to codebases utilizing `(doc ...)` form annotations.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add osoleve/the-fold/doc-forms. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use doc-forms immediately in the current project.

Related Skills

Looking for an alternative to doc-forms or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI