← Back to Skills Marketplace
lywhlao2025

Context Engineering For Projects

by lywhlao2025 · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ✓ Security Clean
266
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install context-engineering-for-projects-skill
Description
Build or initialize team-style project context directories for context engineering. Use when the user says “构建/初始化项目上下文”, “针对该项目构建上下文”, **or** in English phr...
README (SKILL.md)

Context Engineering

Overview

Create a consistent project context structure (team navigation + project folder) and link it to a code directory. Default target root is ~/clawDir/team, but allow the user to specify another root path.

Loading Model (L1/L2/L3)

  • L1: Project skill.md — global overview, module navigation, environment notes.
  • L2: modules/ + agents/ — task-scoped module docs and agent role docs. Load the module overview first, then specific submodules; load the relevant agent README when working on that role’s tasks.
  • L3: references/ — entrypoints, API indices, migrations, evidence-level docs.

Workflow

  1. Collect inputs

    • project_name (folder name)
    • code_dir (absolute path to the code)
    • target_root (optional). If not provided, use ~/clawDir/team.
  2. Analyze the code structure

    • Identify tech stack and main areas (frontend/backend/qa/etc.) from code directory structure and key files.
    • Read top-level docs: README*, docs/, tech.md, architecture.md, CHANGELOG* if present.
  3. Initialize the context structure

    • Prefer running the bundled script:
      python scripts/init_context_project.py \
        --project \x3Cproject_name> \
        --code-dir \x3Ccode_dir> \
        --target-root \x3Ctarget_root>
      
    • The script infers module buckets from the codebase and creates module folders dynamically.
    • The script is idempotent: it won’t overwrite existing files.
  4. Populate content (critical)

    • Fill skill.md (L1) with project summary, architecture, entrypoints, build/run, module navigation.
    • Fill modules/\x3Cmodule>/README.md (overview) and modules/\x3Cmodule>/\x3Cmodule>.md (detail).
    • Fill references/entrypoints.md with code-level entrypoints and indexes.
  5. Post-init checks

    • Verify the created files exist and are filled under: \x3Ctarget_root>/projects/\x3Cproject_name>/.
    • If the user wants custom content, update modules and references accordingly.
    • Record major changes in decisions.md (project-level) or decisions.jsonl (agent-level).

Modules Directory Guidance

  • modules/ is generated based on the target codebase (not fixed).
  • Recommended buckets: frontend, backend, qa, reviewer (only if inferred).
  • Each module may contain multiple detailed docs; keep an overview modules/\x3Cmodule>/README.md and a modules/\x3Cmodule>/\x3Cmodule>.md for detailed module notes.
  • If a domain is present (e.g., mobile, data, ops, infra), create that module.

Generation Rules (Modules & Agents)

Modules

  • Each module folder must include:
    • modules/\x3Cmodule>/README.md (overview)
    • modules/\x3Cmodule>/\x3Cmodule>.md (details: Scope, Key Responsibilities, Important Notes, Interfaces & Dependencies)
  • If a module is large, split into multiple files (e.g., A.md, B.md, C.md). In that case, \x3Cmodule>.md becomes an index/summary that describes each sub-file and when to load it.

Agents

  • Create one folder per agent under agents/\x3Cagent>/.
  • Agent list is inferred from module buckets; always include reviewer.
  • Each agent folder must include:
    • README.md with Role, Principles, Responsibilities, Deliverables, Working Style, Notes
    • tools.md (Markdown)
    • memory.md (Markdown)
    • decisions.jsonl (JSONL, one decision per line)
    • fails.jsonl (JSONL, one failure per line)
  • README.md must also include a brief description of the purpose of other files in the current agent directory.

Content Extraction Rules (General)

Keep SKILL.md lean. For detailed extraction guidance (entrypoints, flows, data, tests, i18n), load:

  • references/extraction-rules.md

Output Templates (Required)

L1 (skill.md)

  • Project summary (what it is + target users)
  • Architecture & boundaries
  • Entrypoints + build/run
  • Module navigation
  • Progressive loading model (L1/L2/L3)
  • Spec-driven development
    • Spec-first rule (no implementation without a spec)
    • Spec template (scope, interfaces, edge cases/errors, acceptance criteria, tests)
    • Change control (spec updates recorded in decisions)
    • Traceability (code/tests map back to spec items)

L2 (modules/\x3Cmodule>/README.md)

  • Responsibilities
  • Key areas/files
  • Typical tasks

L2 (modules/\x3Cmodule>/\x3Cmodule>.md)

  • Scope
  • Key Responsibilities
  • Important Notes (constraints, risks, decisions)
  • Interfaces & Dependencies
  • Key flows (if applicable)
  • Testing/QA hooks

L2 (agents/\x3Cagent>/README.md)

  • Role
  • Principles
  • Responsibilities
  • Deliverables
  • Working Style
  • Notes
  • Description of other files in the agent directory

L3 (references/entrypoints.md)

  • Entry file index
  • Core logic/index files
  • Data/storage index
  • i18n index
  • Build/release/ops entrypoints

Quality Checklist (Before Finalizing)

  • L1 filled with accurate architecture and run/build info
  • Each module has README + \x3Cmodule>.md
  • References contain concrete file paths
  • Loading paths cover UI/UX, core logic, QA, release scenarios
  • Agent folders exist with clear responsibilities

Files Created

  • \x3Ctarget_root>/readme.md (if missing)
  • \x3Ctarget_root>/projects/projects.md (index with new project entry)
  • \x3Ctarget_root>/projects/\x3Cproject_name>/readme.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/goals.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/skill.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/project_status.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/decisions.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/agents/agents.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/modules/README.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/modules/\x3Cmodule>/README.md (modules inferred from code)
  • \x3Ctarget_root>/projects/\x3Cproject_name>/modules/\x3Cmodule>/\x3Cmodule>.md
  • \x3Ctarget_root>/projects/\x3Cproject_name>/references/entrypoints.md

Resources

  • scripts/init_context_project.py — scaffold generator (preferred).
Usage Guidance
This skill appears to do what it says: it inspects a local code directory (top-level files/folders) and scaffolds a project-context tree under a target root (default ~/clawDir/team). It does not access network or request secrets. Before running, verify the --code-dir you pass points to the intended project (avoid pointing to sensitive/system directories) and choose or review the --target-root so you know where files will be created. You can review the included scripts/init_context_project.py (straightforward, idempotent) or run it first in a temporary directory to confirm behavior. If you do not want the agent to modify your filesystem autonomously, avoid enabling autonomous invocation or run the script manually.
Capability Analysis
Type: OpenClaw Skill Name: context-engineering-for-projects-skill Version: 1.0.1 The skill bundle is designed to scaffold a structured project context directory for documentation purposes. It includes a Python script (scripts/init_context_project.py) that creates a directory hierarchy and template Markdown files based on an analysis of a local codebase's structure, with no evidence of data exfiltration, malicious execution, or unauthorized persistence.
Capability Assessment
Purpose & Capability
Name/description claim to scaffold project context directories; the provided Python script and SKILL.md both implement exactly that behavior (inferring modules from a code directory and creating docs). No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md instructs the agent to read the target code directory's top-level files/dirs and to run the bundled script to create context files. This matches the script, which lists top-level entries in code_dir and writes template files under the chosen target root. Note: the skill will read the specified code_dir (top-level entries) and will create files under the target_root—this is expected but worth explicit user confirmation before running.
Install Mechanism
Instruction-only skill with no install spec; the included script is a plain Python file. No downloads or package installs are performed by the skill itself.
Credentials
No environment variables, credentials, or config paths are required. The script uses Path.home() only to compute a default target root; that is proportional to the stated behavior.
Persistence & Privilege
The script creates files under the specified target_root (default ~/clawDir/team) and appends an index entry. always is false. Creating files is expected for a scaffolding tool, but the user should be aware the skill will write to their filesystem and confirm the target path.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install context-engineering-for-projects-skill
  3. After installation, invoke the skill by name or use /context-engineering-for-projects-skill
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
- Expanded trigger phrases in the skill description to include common English commands, enabling the skill with prompts like “build/initialize project context”, “scaffold project context”, “set up team context”, and others. - No changes to workflow, output templates, or content structure. - No impact on usage for existing Chinese trigger phrases.
v1.0.0
Scaffold a complete context-engineering system for any project: L1/L2/L3 docs, module & agent specs, entrypoint references, and spec-driven workflows—built for scalable, traceable collaboration.
Metadata
Slug context-engineering-for-projects-skill
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is Context Engineering For Projects?

Build or initialize team-style project context directories for context engineering. Use when the user says “构建/初始化项目上下文”, “针对该项目构建上下文”, **or** in English phr... It is an AI Agent Skill for Claude Code / OpenClaw, with 266 downloads so far.

How do I install Context Engineering For Projects?

Run "/install context-engineering-for-projects-skill" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Context Engineering For Projects free?

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

Which platforms does Context Engineering For Projects support?

Context Engineering For Projects is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Context Engineering For Projects?

It is built and maintained by lywhlao2025 (@lywhlao2025); the current version is v1.0.1.

💬 Comments