← Back to Skills Marketplace
sopaco

Project Context Generator For AI

by Sopaco · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
78
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install ai-context-generator
Description
Generates .ai-context knowledge base for coding agents. Activate when: (1) setting up a new project for AI-assisted development, (2) user asks to "create pro...
README (SKILL.md)

AI Context Generator

A reusable skill for creating project knowledge bases that help coding agents work faster and smarter.


🎯 When to Use This Skill

Activate when:

  • Setting up a new project for AI-assisted development
  • User requests: "create ai-context", "setup project knowledge", "generate .ai-context"
  • Existing .ai-context is outdated and needs regeneration
  • After major project restructuring

Do NOT activate when:

  • Project already has fresh .ai-context (check SKILL.md date)
  • User asks for unrelated documentation
  • Simple code tasks with clear existing context

📋 What This Skill Generates

Creates a .ai-context/ directory with:

.ai-context/
├── SKILL.md                    # Entry point with activation rules
├── DYNAMICS.md                 # Active issues & constraints (Dynamic)
├── references/
│   ├── PROJECT-ESSENCE.md      # What & why (High stability)
│   ├── ARCHITECTURE.md         # Component relationships (Medium stability)
│   └── DECISIONS.md            # Design decisions (Update on change)
└── meta/
    ├── MAINTENANCE.md          # How to maintain this knowledge
    ├── templates/              # (Optional) Custom templates
    └── scripts/                # (Optional) Maintenance scripts

Stability Tiers

Tier File Update Frequency Token Budget
0 PROJECT-ESSENCE.md Quarterly / Major version ~500 tokens
1 ARCHITECTURE.md Monthly / Sprint ~1000 tokens
2 DECISIONS.md Per decision change ~800 tokens
3 DYNAMICS.md As needed (issues) ~600 tokens

🔧 Generation Process

Step 1: Gather Project Intelligence

Before generating, collect:

□ Read AGENTS.md (if exists) — operational rules
□ Read README.md — user-facing description
□ Read package.json — dependencies, scripts, entry points
□ Scan directory structure — identify components
□ Read docs/ or litho.docs/ — existing documentation
□ Identify key source files — main entry points
□ Note technology stack — frameworks, languages, platforms

Step 2: Extract Knowledge

For PROJECT-ESSENCE.md:

  • What is this project? (one sentence)
  • Why does it exist? (problem/solution)
  • Who is it for? (target users)
  • What does it provide? (key features)
  • Core constraints? (security, compatibility)

For ARCHITECTURE.md:

  • System diagram (ASCII or Mermaid)
  • Component responsibilities
  • Data flow between components
  • Key dependencies
  • Important patterns

For DECISIONS.md:

  • Non-obvious design choices
  • Trade-offs made
  • Constraints accepted
  • Decisions that might be revisited

For DYNAMICS.md:

  • Current blockers
  • Known workarounds
  • Temporary constraints
  • Recently resolved issues (brief)

Step 3: Generate Files

Use templates from templates/ directory:

  1. Start with SKILL.md — entry point with activation rules
  2. Generate references/PROJECT-ESSENCE.md — core identity
  3. Generate references/ARCHITECTURE.md — component map
  4. Generate references/DECISIONS.md — design rationale
  5. Generate DYNAMICS.md — active issues
  6. Generate meta/MAINTENANCE.md — upkeep guide

Step 4: Validate Quality

□ SKILL.md has clear activation triggers
□ PROJECT-ESSENCE.md readable in 2 minutes
□ ARCHITECTURE.md shows big picture (no code)
□ DECISIONS.md justified with rationale
□ DYNAMICS.md only contains current issues
□ All files dated at top
□ Total token budget \x3C 4000 tokens

📝 Writing Principles

Do:

  • ✅ Write for someone who knows nothing about the project
  • ✅ Use diagrams over paragraphs
  • ✅ Focus on "why" not "how"
  • ✅ Keep files under 150 lines each
  • ✅ Link between related sections
  • ✅ Include "Last updated" dates

Don't:

  • ❌ Copy-paste code snippets (link to files instead)
  • ❌ Document every file/function
  • ❌ Include details that change frequently
  • ❌ Duplicate content across files
  • ❌ Use jargon without context

🔄 Integration with AGENTS.md

AGENTS.md = "How to work" (commands, style, rules)
.ai-context = "What the project is" (architecture, decisions, issues)

Both should be read at session start. They serve different purposes and should not overlap.


📚 Template Reference

Templates are provided in templates/:

Template Purpose
skill.md.tmpl SKILL.md with placeholder prompts
essence.md.tmpl PROJECT-ESSENCE.md structure
architecture.md.tmpl ARCHITECTURE.md with diagram prompts
decisions.md.tmpl DECISIONS.md with ADR format
dynamics.md.tmpl DYNAMICS.md with status tracking
maintenance.md.tmpl MAINTENANCE.md guide

🛠️ Automation Scripts

Scripts in scripts/ can help with:

Script Purpose
generate.ts Interactive generation from templates
check-drift.ts Compare documented vs actual structure
audit-dynamics.ts Flag stale issues (>30 days)

💡 Example Usage

User: "Setup ai-context for my project"

Agent:

  1. Activate this skill
  2. Read AGENTS.md, README.md, package.json
  3. Scan directory structure
  4. Generate each file using templates
  5. Ask clarifying questions if needed:
    • "What's the main problem this project solves?"
    • "Any non-obvious design decisions I should know about?"
    • "Current blockers or workarounds?"

⚠️ Important Notes

  • Generated knowledge is a starting point, not final truth
  • Agent should verify against actual code during first session
  • User should review generated content for accuracy
  • Schedule regular audits (monthly recommended)

📖 References


This skill creates knowledge bases optimized for AI agents. For questions or improvements, see MAINTENANCE.md.

Usage Guidance
This skill appears to be what it says: a generator for a .ai-context knowledge base. Before installing or running it, do the following: - Inspect scripts/generate.ts yourself (it is included) and run it in a sandbox or review its behavior; it uses only fs/path and template rendering in the copy provided. - Ensure you have the runtime required to run the script (the script uses a Bun shebang). Either install Bun or run the script via an appropriate Node/TS workflow; the registry metadata should have declared this but does not. - Give the agent access only to the project workspace you intend it to read. The skill reads local project files (README.md, package.json, AGENTS.md, docs/, source tree); avoid granting repository-wide or system-wide file access if not needed. - Confirm there are no project-local templates or meta/scripts that call out to remote URLs or perform network operations before letting an agent run automated generation. - If you want tighter operational clarity, ask the publisher to update the metadata to declare the required runtime (bun/node) and to document any network or side-effecting behavior; absence of those declarations is likely an oversight, not malicious intent.
Capability Analysis
Type: OpenClaw Skill Name: ai-context-generator Version: 1.0.0 The ai-context-generator skill is a utility designed to create a structured knowledge base (.ai-context directory) to help AI agents understand project architecture and design decisions. The core logic in scripts/generate.ts performs standard file system operations (reading package.json/README.md and writing markdown files) without any evidence of data exfiltration, network activity, or malicious execution. The SKILL.md instructions are aligned with the stated purpose of documentation generation and do not contain harmful prompt-injection triggers.
Capability Assessment
Purpose & Capability
The skill's name, README, SKILL.md, templates, and scripts all align: they generate a .ai-context directory and read project files (README.md, package.json, AGENTS.md, docs/, source tree) to produce documentation. One inconsistency: the shipped script (scripts/generate.ts) uses a Bun shebang and TypeScript, so a Bun/Node runtime is effectively required to run the automation — but the skill's registry metadata lists no required binaries. This is likely an omission rather than malicious, but it is a capability/requirement mismatch the user should be aware of.
Instruction Scope
SKILL.md explicitly instructs the agent to read local project files (AGENTS.md, README.md, package.json, docs/, source tree) and to generate docs from templates. All referenced actions are within the project scope and relevant to creating a knowledge base. There are no instructions to read unrelated system files, environment variables, or to transmit data to external endpoints.
Install Mechanism
No install spec is provided (instruction-only), which minimizes risk. However, the included script is executable (#!/usr/bin/env bun) and expects Bun to run; the absence of a declared runtime/install step or required-binaries entry is an operational gap. There are no downloads or external install URLs in the files reviewed.
Credentials
The skill does not request any environment variables, credentials, or config paths. The files and templates likewise do not reference secrets or external service tokens. Requested file reads are limited to project-local files and templates, which is proportionate to the described function.
Persistence & Privilege
The skill is not configured as always-on and does not request persistent system privileges or attempt to modify other skills or global agent settings. It creates/updates files under a project-local .ai-context directory, which is appropriate for its purpose.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ai-context-generator
  3. After installation, invoke the skill by name or use /ai-context-generator
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Version 1.0.0 - Initial release of the “ai-context-generator” skill. - Generates structured, tiered project knowledge bases for AI coding agents. - Includes clear activation triggers, generation process, writing guidelines, and file roles. - Provides templates and automation script scaffolding for maintainable documentation. - Reference guide and maintenance best practices included.
Metadata
Slug ai-context-generator
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Project Context Generator For AI?

Generates .ai-context knowledge base for coding agents. Activate when: (1) setting up a new project for AI-assisted development, (2) user asks to "create pro... It is an AI Agent Skill for Claude Code / OpenClaw, with 78 downloads so far.

How do I install Project Context Generator For AI?

Run "/install ai-context-generator" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Project Context Generator For AI free?

Yes, Project Context Generator For AI is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Project Context Generator For AI support?

Project Context Generator For AI is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Project Context Generator For AI?

It is built and maintained by Sopaco (@sopaco); the current version is v1.0.0.

💬 Comments