AgentSkillsCN

context-loader

高效加载项目上下文,适用于Conductor工作流。在开始新任务、实现功能或需要项目上下文但又不想消耗过多令牌时使用。

SKILL.md
--- frontmatter
name: context-loader
description: Load project context efficiently for Conductor workflows. Use when starting work on a track, implementing features, or needing project context without consuming excessive tokens.

Context Loader Skill

Efficiently load and manage project context for Conductor's context-driven development workflow.

Trigger Conditions

Use this skill when:

  • Starting work on a new track or feature
  • User mentions: "load context", "project context", "get context"
  • Beginning /conductor:implement workflow
  • Need to understand project structure without reading all files

Token Optimization Protocol

1. Respect Ignore Files

Before scanning files, check for:

  1. .claudeignore - Claude-specific ignores
  2. .gitignore - Standard git ignores
bash
# Check for ignore files
ls -la .claudeignore .gitignore 2>/dev/null

2. Efficient File Discovery

Use git for tracked files:

bash
git ls-files --exclude-standard -co | head -100

For directory structure:

bash
git ls-files --exclude-standard -co | xargs -n 1 dirname | sort -u

3. Priority Files (Read First)

PriorityFile TypeExamples
1Manifestspackage.json, Cargo.toml, pyproject.toml
2Conductorconductor/product.md, conductor/tech-stack.md
3Trackconductor/tracks/<id>/spec.md, plan.md
4Configtsconfig.json, .env.example

4. Large File Handling

For files over 1MB:

  • Read first 20 lines (header/imports)
  • Read last 20 lines (exports/summary)
  • Skip middle content

Context Loading Workflow

code
1. Load CLAUDE.md (if exists)
2. Load conductor/product.md (project vision)
3. Load conductor/tech-stack.md (technical context)
4. Load current track spec.md (requirements)
5. Load current track plan.md (tasks)

Response Format

After loading context, summarize:

code
## Project Context Loaded

**Product**: [one-line summary]
**Tech Stack**: [key technologies]
**Current Track**: [track name/id]
**Active Phase**: [current phase]
**Pending Tasks**: [count]