ai-context-generator

Generates tiered .ai-context knowledge base directories for coding agents.

1.7k|190|Updated Sep 5, 2025
One-click install
npx skills add https://github.com/sopaco/deepwiki-rs --skill ai-context-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-context-generator
Source: https://github.com/sopaco/deepwiki-rs/tree/main/.agents/skills/ai-context-generator
Command: npx skills add https://github.com/sopaco/deepwiki-rs --skill ai-context-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Coding agents repeatedly spend tokens and time exploring codebases to rebuild project context in every session. This Skill generates a pre-built .ai-context/ knowledge base so agents start with project essence, architecture, decisions, and active issues already documented.

Core Features & Use Cases

  • Tiered Knowledge Generation: Creates PROJECT-ESSENCE.md, ARCHITECTURE.md, DECISIONS.md, and DYNAMICS.md organized by stability tier with a total budget of roughly 4000 tokens.
  • Template and Script Automation: Ships a Bun/TypeScript generator script that scans package.json, README.md, and directory structure to scaffold the knowledge base with placeholders.
  • Maintenance Guidance: Includes a writing guide and MAINTENANCE.md defining update triggers, quality checklists, and anti-patterns to prevent documentation drift.
  • Use Case: When onboarding an agent to a 50k-line repository, run this Skill once so future sessions load ~4000 tokens of curated context instead of re-exploring the entire codebase.

Quick Start

Ask your agent to use the ai-context-generator skill to set up .ai-context for this project.

Frequently Asked Questions about ai-context-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a project knowledge base for coding agents?

Invoke the ai-context-generator skill and it reads your AGENTS.md, README.md, and package.json, scans the directory structure, then generates a .ai-context folder with tiered markdown files. You review the output and fill in any TBD placeholders.

What files does the .ai-context directory contain?

It contains SKILL.md as the entry point, DYNAMICS.md for active issues, a references folder with PROJECT-ESSENCE.md, ARCHITECTURE.md, and DECISIONS.md, plus a meta folder with MAINTENANCE.md. Total content targets roughly 4000 tokens.

Does ai-context-generator work with Claude Code and Cursor?

Yes, the generated structure follows the Agent Skills specification and is compatible with Claude Code's skill system and Cursor's context system. It complements rather than replaces an AGENTS.md file.

How is .ai-context different from AGENTS.md?

AGENTS.md describes how to work in the project, covering commands, style, and rules written by maintainers. The .ai-context directory describes what the project is, covering architecture, design decisions, and active issues, and both should be read at session start.

When should I not generate an .ai-context knowledge base?

Skip generation when the project already has a fresh .ai-context, when the task is a simple mechanical edit with clear context, or when documentation would duplicate details that change frequently. Generated knowledge is a starting point and must be verified against actual code.