Install
openclaw skills install context-engineering-for-projects-skillBuild or initialize team-style project context directories for context engineering. Use when the user says “构建/初始化项目上下文”, “针对该项目构建上下文”, **or** in English phr...
openclaw skills install context-engineering-for-projects-skillCreate 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.
skill.md — global overview, module navigation, environment notes.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.references/ — entrypoints, API indices, migrations, evidence-level docs.Collect inputs
project_name (folder name)code_dir (absolute path to the code)target_root (optional). If not provided, use ~/clawDir/team.Analyze the code structure
README*, docs/, tech.md, architecture.md, CHANGELOG* if present.Initialize the context structure
python scripts/init_context_project.py \
--project <project_name> \
--code-dir <code_dir> \
--target-root <target_root>
Populate content (critical)
skill.md (L1) with project summary, architecture, entrypoints, build/run, module navigation.modules/<module>/README.md (overview) and modules/<module>/<module>.md (detail).references/entrypoints.md with code-level entrypoints and indexes.Post-init checks
<target_root>/projects/<project_name>/.decisions.md (project-level) or decisions.jsonl (agent-level).modules/ is generated based on the target codebase (not fixed).frontend, backend, qa, reviewer (only if inferred).modules/<module>/README.md and a modules/<module>/<module>.md for detailed module notes.mobile, data, ops, infra), create that module.modules/<module>/README.md (overview)modules/<module>/<module>.md (details: Scope, Key Responsibilities, Important Notes, Interfaces & Dependencies)A.md, B.md, C.md). In that case, <module>.md becomes an index/summary that describes each sub-file and when to load it.agents/<agent>/.reviewer.README.md with Role, Principles, Responsibilities, Deliverables, Working Style, Notestools.md (Markdown)memory.md (Markdown)decisions.jsonl (JSONL, one decision per line)fails.jsonl (JSONL, one failure per line)Keep SKILL.md lean. For detailed extraction guidance (entrypoints, flows, data, tests, i18n), load:
references/extraction-rules.md<target_root>/readme.md (if missing)<target_root>/projects/projects.md (index with new project entry)<target_root>/projects/<project_name>/readme.md<target_root>/projects/<project_name>/goals.md<target_root>/projects/<project_name>/skill.md<target_root>/projects/<project_name>/project_status.md<target_root>/projects/<project_name>/decisions.md<target_root>/projects/<project_name>/agents/agents.md<target_root>/projects/<project_name>/modules/README.md<target_root>/projects/<project_name>/modules/<module>/README.md (modules inferred from code)<target_root>/projects/<project_name>/modules/<module>/<module>.md<target_root>/projects/<project_name>/references/entrypoints.mdscripts/init_context_project.py — scaffold generator (preferred).