用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CleanExpo/Unite-Group --skill context-partitioning命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
The authoritative environment-variable registry for the Unite-Group Nexus. Use whenever adding, reading, renaming, or debugging an env var or secret — new integration config, a `process.env.X` read, an auth/OAuth wiring, a cron secret, a "which variable holds this" question, or a "works locally but not in prod" symptom. Also use before pinning any variable name in code, and when reconciling the two credential planes (Vercel prod vs the local hermes fleet). Prevents the `APIFY_API_KEY` vs `APIFY_API_TOKEN` class of drift.
Create, verify, and promote Supabase schema changes via database branches. Every schema change/migration must be validated on a Supabase database branch before prod (see CLAUDE.md line 44).
Verify production Supabase schema before shipping code that touches it. Use BEFORE writing or reviewing ANY code that reads or writes a Supabase table in the Nexus — new queries, inserts, updates, CHECK-constrained values, RLS-dependent reads, cron data access — even one-line changes and even when the table "obviously" exists. Also use immediately when a query fails with "column does not exist", when inserts appear to succeed but produce no rows, or when generated TypeScript types disagree with runtime behaviour.
正在显示 SKILL.md
基于 SOC 职业分类
| name | context-partitioning |
| category | context |
| version | 2.0.0 |
| description | Manifest-first context isolation — each subagent receives only its scope, never the full codebase |
| author | Unite Group (ported from NodeJS-Starter-V1) |
| priority | 1 |
| auto_load | true |
| triggers | ["any_dispatch","spawn_subagent","agent_harness"] |
| context | fork |
Without explicit context isolation, the main orchestrator context window accumulates:
Result: context bloat → compaction → rule violations → wrong output.
Rule: Before dispatching ANY subagent, the orchestrator MUST produce a typed manifest. The manifest is the subagent's entire world — it reads NOTHING outside its manifest.
{
"agent": "frontend-specialist",
"task": "Add persona avatar upload to SocialPersonasManager",
"toolshed": "frontend",
"token_budget": 60000,
"files": {
"must_read": [
"src/components/social/SocialPersonasManager.tsx",
"src/lib/businesses.ts"
],
"reference_only": [
"src/app/globals.css"
],
"must_not_touch": [
"src/lib/supabase/"
| Agent Role | Hard Cap | Consequence of Breach |
|---|---|---|
| Orchestrator | 80,000 | Delegate immediately — do not read more files |
| Frontend Specialist | 60,000 | Scope to src/components/ + src/app/ only |
| Senior Fullstack | 60,000 | Scope to task-relevant src/app/api/ + src/lib/ files |
| Database Specialist | 40,000 | Scope to supabase/migrations/ + schema file only |
| Security Auditor | 50,000 | Scope to auth path + affected routes only |
| Bug Hunter | 40,000 | Failing file + direct imports one level deep only |
| Test Engineer | 50,000 | Test file + source file under test only |
| Verification | 30,000 | Verification output only — no source reads |
| Scope Token | Resolves To |
|---|---|
src/ | Full src directory — only for orchestrator planning |
failing-file-only | The single file containing the error |
direct-imports-one-level | Files imported by the failing file (not transitive) |
test-files | src/**/*.test.ts, src/**/*.spec.ts, tests/ |
source-file-under-test | The exact file being tested |
task-specific | Orchestrator selects based on task decomposition |
Step 1 — DISCOVER (Orchestrator, Glob/Grep only)
→ Identify affected files by pattern, not by reading
→ Check VAULT-INDEX.md for known asset locations
→ Load toolshed entry from toolsheds.json
Step 2 — MANIFEST (Orchestrator, write manifest)
→ Populate must_read, reference_only, must_not_touch
→ Select max 5-6 skills from toolshed
→ Set token_budget from toolsheds.json
→ Write success_criteria in verifiable terms
Step 3 — DISPATCH (Orchestrator → Agent tool)
→ Pass manifest as the agent's complete prompt
→ Agent reads ONLY manifest.files.must_read
→ Agent loads ONLY manifest.skills
Step 4 — RETURN (Subagent → Orchestrator)
→ Return: list of files modified + verification output
→ Do NOT return full file contents
→ Do NOT return intermediate reasoning
Step 5 — INTEGRATE (Orchestrator)
→ Accept structured summary
→ Route to verification agent
→ Main context stays lean
| Anti-Pattern | Why | Fix |
|---|---|---|
Read("src/") in orchestrator | Dumps entire codebase into context | Glob for paths only |
| Subagent reads files outside manifest | Context bleed, token waste | Manifest must_not_touch |
| Return full file content from subagent | Doubles context usage | Return file path + diff summary |
| Load all P1 skills for every task | Token waste on irrelevant skills | Load toolshed subset only |
| Re-verify work in orchestrator | Redundant, wastes context | Delegate to verification agent |
This skill works in tandem with .claude/data/toolsheds.json:
token_budget, skills, and context_scopeReference: .claude/AGENT_HARNESS.md Phase 4 for dispatch protocol.