skills/aif-reference/SKILL.md
Create knowledge references from URLs, documents, or files for use by AI agents. Fetch, process, and store structured references in the configured references directory (default: .ai-factory/references/).
npx skillsauth add lee-to/ai-factory aif-referenceInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create structured knowledge references from external sources and store them in the configured references directory so other AI Factory skills can reuse them later.
FIRST: Read .ai-factory/config.yaml if it exists to resolve:
paths.references and paths.rules_filelanguage.ui for prompts and summaries, language.artifacts for generated reference artifacts, and language.technical_terms for human-readable technical terminology in referencesIf config.yaml doesn't exist, use defaults:
.ai-factory/references/.ai-factory/RULES.mdui_language: enartifact_language: entechnical_terms_policy: keepResolved language values:
ui_language = language.ui || "en"artifact_language = language.artifacts || language.ui || "en"technical_terms_policy = language.technical_terms || "keep"If technical_terms_policy is not one of keep, translate, or mixed, treat it as keep. Legacy values such as english also behave like keep.
All AskUserQuestion prompts, progress updates, summaries, and next-step guidance MUST be written in ui_language.
Generated reference files and the reference INDEX.md MUST be written in artifact_language.
Templates and examples define structure, not fixed English output. If artifact_language is not en, translate human-readable headings, labels, summaries, concept explanations, best-practice prose, pitfalls, and index descriptions before saving. Preserve source quotations, source titles, URLs, local paths, code examples, API signatures, command names, config keys, package names, version strings, raw errors, and link targets unchanged. Apply technical_terms_policy to other human-readable terminology.
Read .ai-factory/skill-context/aif-reference/SKILL.md - MANDATORY if the file exists.
This file contains project-specific rules accumulated by /aif-evolve from patches,
codebase conventions, and tech-stack analysis. These rules are tailored to the current project.
How to apply skill-context rules:
Enforcement: After generating any output artifact, verify it against all skill-context rules. If any rule is violated - fix the output before presenting it to the user.
/aif-plan, /aif-implement, /aif-explore, or /aif-groundedCheck $ARGUMENTS:
- Contains "--update" -> Update Mode: refresh existing reference
- Contains URLs (http/https) -> URL Mode: fetch and process web sources
- Contains file paths -> File Mode: process local documents
- "list" -> List existing references
- "show <name>" -> Show reference content
- "delete <name>" -> Delete a reference (with confirmation)
- Empty -> Interactive mode
Ensure the resolved references directory exists:
mkdir -p <resolved references dir>
Check for existing references to avoid duplicates:
ls <resolved references dir>
If --name <ref-name> is provided, use it as the reference name.
If --update is provided, find and update the existing reference instead of creating a new one.
For URLs:
For each URL:
WebFetch and extract:
WebSearch queries to fill them.For local files:
ReadFor interactive mode:
Ask the user:
Transform collected material into a structured reference document.
Reference file format:
Render this structure in artifact_language before saving. The headings below are canonical structure labels, not fixed English output.
# <Topic> Reference
> Source: <list of source URLs or file paths>
> Created: YYYY-MM-DD
> Updated: YYYY-MM-DD
## Overview
<1-3 paragraph summary>
## Core Concepts
<Concept 1>: <clear explanation>
<Concept 2>: <clear explanation>
## API / Interface
<Only if applicable. Preserve exact signatures and types from source docs.>
## Usage Patterns
<Practical code examples organized by use case.>
## Configuration
<Options, defaults, valid values. Table format preferred.>
## Best Practices
<Numbered list with reasoning>
## Common Pitfalls
<What goes wrong and how to avoid it>
## Version Notes
<Only if relevant. Breaking changes, migration notes, deprecations.>
Quality rules:
Naming convention:
react-hooks.md, fastapi-endpoints.md, docker-compose.md.md--name was provided, use that (add .md if missing)reference.mdSave to: <resolved references dir>/<name>.md
Check if <resolved references dir>/INDEX.md exists. Create or update it:
Write human-readable index headings, topic descriptions, and source summaries in artifact_language; keep filenames, links, URLs, and dates unchanged.
# References Index
Available knowledge references for AI agents.
| Reference | Topic | Sources | Updated |
|-----------|-------|---------|---------|
| [react-hooks](react-hooks.md) | React Hooks API and patterns | react.dev | 2026-03-20 |
| [docker-compose](docker-compose.md) | Docker Compose configuration | docs.docker.com | 2026-03-20 |
Show the user:
--update)When --update is present:
--name or matching sourcesCreated:, update Updated:/aif-reference list - read and display <resolved references dir>/INDEX.md or list files in the directory/aif-reference show <name> - read and display the reference content (.md is optional)/aif-reference delete <name> - ask for confirmation, delete the file, and update INDEX.mdReferences in the resolved references directory are available to all AI Factory skills:
/aif-plan and /aif-implement can read them for domain context/aif-grounded can use them as evidence sources/aif-explore can reference them during researchTo make a skill aware of a specific reference, mention it in the resolved RULES.md file:
## References
- For <topic> details, see `<resolved references dir>/<name>.md`
.ai-factory/references/)INDEX.md inside that directory).ai-factory/ filespaths.references for storage, paths.rules_file when pointing other skills at a saved reference, language.ui for prompts and summaries, language.artifacts for generated reference artifacts, and language.technical_terms for human-readable terminology policy.INDEX.md insidedata-ai
Archive completed plans and roadmap milestones. Moves finished plans to the archive directory and optionally trims closed milestones from ROADMAP.md. Use when user says "archive plans", "clean up plans", "archive completed", or "trim roadmap".
tools
Set up agent context for a project. Analyzes tech stack, installs relevant skills from skills.sh, generates custom skills, and configures MCP servers. Use when starting new project, setting up AI context, or asking "set up project", "configure AI", "what skills do I need".
development
Verify completed implementation against the plan. Checks that all tasks were fully implemented, nothing was forgotten, code compiles, tests pass, and quality standards are met. Use after "/aif-implement" completes, or when user says "verify", "check work", "did we miss anything".
data-ai
Plan implementation for a feature or task. Two modes — fast (single quick plan) or full (richer plan with optional git branch/worktree flow). Use when user says "plan", "new feature", "start feature", "create tasks".