# Codex Team Skill Handoff

This document is the copy surface for teammates who need to use Codex with `zhctprompt`.

## Source Of Truth

The durable project skill source is:

```text
zhctprompt/standards-stack/agent-skills/skills/
```

Personal skill directories such as `/Users/jack/.codex/skills` are intake sources only. Do not copy a personal Codex directory wholesale into the project because it can contain user-specific tools, memories, connectors, experiments, and machine-local assumptions.

## What To Copy

For teammates, copy or keep access to these project files:

- `AGENTS.md`
- `control/workspace-root-AGENTS.md`
- `CLAUDE.md`
- `.cursor/rules/karpathy-guidelines.mdc`
- `HEARTBEAT.md`
- `README.md`
- `control/local-paths.md`
- `standards-stack/README.md`
- `standards-stack/agent-skills/README.md`
- `standards-stack/agent-skills/CODEX_TEAM_SKILL_HANDOFF.md`
- `standards-stack/agent-skills/scripts/install_project_skills_to_codex.sh`
- `standards-stack/agent-skills/PRODUCT_DESIGN_SKILL_PACK.md`
- `standards-stack/agent-skills/CODEX_TEAM_SKILL_MANIFEST.xlsx`
- `standards-stack/agent-skills/CODEX_TEAM_SKILL_MANIFEST.csv`
- `standards-stack/agent-skills/skills/`
- `standards-stack/management/product-development-department/`

Do not copy business code into `zhctprompt`. Business repositories stay outside this control project and are documented through `control/local-paths.md` and `work_<project>/`.

## Two Usage Modes

### Auto-install mode

Use this when a teammate has just cloned `zhctprompt` and opened it in Codex on a local Mac.

Project startup rules load:

```text
standards-stack/agent-skills/skills/codex-project-skill-auto-install/SKILL.md
```

The agent checks whether these local files exist:

```text
$HOME/.codex/skills/codex-team-skill-handoff/SKILL.md
$HOME/.codex/skills/codex-project-skill-auto-install/SKILL.md
```

If they are missing, Codex should prefer a background child thread to run:

```bash
bash standards-stack/agent-skills/scripts/install_project_skills_to_codex.sh
```

If a child-thread tool is unavailable, the current thread may run the same script. For validation without writing to the current Mac:

```bash
bash standards-stack/agent-skills/scripts/install_project_skills_to_codex.sh --dry-run
```

This mode copies only `standards-stack/agent-skills/skills/` into `$HOME/.codex/skills/`; it never copies personal `~/.codex` state, memories, connectors, tokens, cookies, browser profiles, or secrets.

### Project-reference mode

Use this when Codex is opened inside `zhctprompt`.

1. Open a Codex thread with working directory `zhctprompt`.
2. Ask Codex to read `AGENTS.md`.
3. Let the project rules reference skills by path under `standards-stack/agent-skills/skills/`.

This mode keeps skills versioned with the project and is the safest default for teammates.

If Codex is opened from the parent `zhct/` workspace root, copy the versioned bootstrap first:

```bash
cd /path/to/zhct
cp zhctprompt/control/workspace-root-AGENTS.md AGENTS.md
```

That root bootstrap makes future workspace-root sessions update `zhctprompt` with `git pull --ff-only` before substantive Q&A, while stopping on local changes or pull blockers.

### Local-skill mode

Use this only when a teammate's Codex client supports local skills and needs triggerable skills outside `zhctprompt`.

```bash
ZHCTPROMPT=/path/to/zhct/zhctprompt
mkdir -p "$HOME/.codex/skills"
rsync -a "$ZHCTPROMPT/standards-stack/agent-skills/skills/" "$HOME/.codex/skills/"
```

After copying, still start zhct work from `zhctprompt` so relative paths in the skills resolve correctly.

For `yunxiao-wedrive-agentic-collaboration`, teammates do not need to write a rigid prompt with mode/input/target. They can state the work naturally, for example "帮我看看这个 MR 能不能合", "把这个聊天记录整理成云效任务", or "根据微盘资料拆任务并判断哪些阻塞". The skill first creates an internal route, then calls the matching review, scheduling, Yunxiao, WeDrive, or lifecycle workflow.

For `aliyun-sls-log-triage`, teammates should prefer the bundled SDK script at `standards-stack/agent-skills/skills/aliyun-sls-log-triage/scripts/sls_query.py`. Install the official Python SDK with `python3 -m pip install --user aliyun-log-python-sdk` if needed, then place read-only SLS credentials in ignored local config `config/local/aliyun-sls.env`. Never commit AK, STS tokens, signatures, full mobile numbers, or raw production payloads.

For `wechat-article-youdao-intake`, teammates need the local `youdaonote` CLI configured with their own account. The skill is copied from this project, but Youdao API keys, WeChat cookies, browser profiles, and personal authentication state are never copied. If a WeChat article is blocked by captcha, save a recovery note instead of treating the verification page as the article.

For `delivery-recording-knowledge-agent`, teammates should keep original audio and video files in the team WeDrive folder, not in Git. Copy or derive only small transcript, CSV, Markdown, and HTML review assets into `zhctprompt`; every recording needs a root key, relative path, SHA256, access policy, and project/customer tags before it is considered linked.

For `ai-organization-operating-model`, teammates should copy both the skill and its Wiki source. The skill is only the routing/execution wrapper; the reusable method lives in `standards-stack/llm-wiki/ai-organization-methodology/`.

## Skill Groups

| Group | Skills | Purpose |
| --- | --- | --- |
| Lifecycle | `goal`, `spec-driven-development`, `planning-and-task-breakdown`, `incremental-implementation`, `test-driven-development`, `debugging-and-error-recovery`, `code-review-and-quality`, `code-simplification`, `security-and-hardening`, `documentation-and-adrs`, `shipping-and-launch` | General task delivery flow from GOAL to SHIP. |
| Browser and quality evidence | `webapp-testing`, `dengbao-remediation-evidence-pack`, `karpathy-guidelines` | Local web verification, evidence packs, and stricter coding behavior. |
| zhct operations | `yunxiao-wedrive-agentic-collaboration`, `yunxiao-batch-subagent-execution`, `yunxiao-codeup-pr-association`, `aliyun-sls-log-triage`, `async-export-streaming-xlsx` | Yunxiao, WeDrive, Codeup, SLS SDK log triage, AI review, scheduling, and `store` export workflows. |
| Control governance | `user-taught-skill-capture`, `controlled-project-workspace-placement`, `task-index-library-maintenance`, `task-thread-title-ticket-prefix`, `codex-team-skill-handoff`, `codex-project-skill-auto-install`, `wechat-article-youdao-intake` | Keep reusable rules, project placement, thread naming, task indexes, team skill handoff/installation, and WeChat-to-Youdao article intake durable. |
| Delivery knowledge | `delivery-recording-knowledge-agent`, `delivery-asset-agent`, `operation-manual-video` | Turn delivery recordings, transcripts, issue closure, experience packs, manuals, and videos into reusable delivery assets. |
| Product design | `product-development-master-agent`, `product-design-solution-workspace`, `product-capability-map-synthesis`, `product-strategy-planning`, `smart-canteen-strategy-agent`, `digital-business-investor-strategy-lens`, `product-intro-pdf-generation`, `food-safety-solution-pdf-agent`, `delivery-asset-agent`, `evidence-classification-agent`, `company-wedrive-knowledge-base`, `large-source-asset-management` | Route product design and solution work from IPO intake through UI/prototype, architecture, capability map, strategy, evidence, and presales asset generation. See `PRODUCT_DESIGN_SKILL_PACK.md`. |
| Q&A and organization reasoning | `ai-prompting-quality-guardrails`, `thinking-model-answering`, `ai-organization-operating-model` | Make non-trivial teammate questions evidence-aware, route answers through suitable thinking models, and design AI organization operating models with roles, objects, gates, and rollout slices. |
| Management standards | `product-development-management-standard` | Apply and share the product-development department manager/project/Yunxiao management standard, source Word docs, and Excel/CSV project-manager checklist. |
| Team tools | `aimami-install`, `zhct-readme-docker-start`, `zhct-docker-php-verification` | macOS app install guides, Docker environment setup, and shared team tooling documentation. |

See `CODEX_TEAM_SKILL_MANIFEST.xlsx` or `CODEX_TEAM_SKILL_MANIFEST.csv` for one row per skill.

## Reviewed Local Sources

The local inventory checked:

- `/Users/jack/.codex/skills`
- `/Users/jack/.agents/skills`
- `zhctprompt/standards-stack/agent-skills/skills`

Result:

- Project-specific zhct workflows already live in `standards-stack/agent-skills/skills/`.
- `karpathy-guidelines` is already imported into the project and should be copied from the project version, not from the personal directory.
- `skill-development` remains an authoring reference and is not required in the teammate zhct pack.
- `youdaonote` is account/tool specific. Keep it as a local prerequisite when needed, not as a mandatory zhct skill copy.
- Generic personal agent skills such as memory, autonomy, browser, and PM advisory skills are not part of the zhct teammate baseline unless a future task explicitly vets and imports them.

## Maintenance Rule

When a future user asks to "沉淀成 skill", "装进本项目", or "复制给其他人使用 Codex":

1. Use `standards-stack/agent-skills/skills/user-taught-skill-capture/SKILL.md`.
2. Use `standards-stack/agent-skills/skills/codex-team-skill-handoff/SKILL.md` if teammate copying or local Codex installation is involved.
3. Use `standards-stack/agent-skills/skills/codex-project-skill-auto-install/SKILL.md` if a teammate's cloned project should automatically install local Codex skills through a background child thread or inline fallback script.
4. Update the manifest and this handoff document.
5. Update `control/task-index/tasks.tsv` with the evidence path.

For `thinking-model-answering`, teammates should copy both the skill and its compiled Markdown source, including `full-content.md`, `models/`, and route CSV/Markdown files:

```text
standards-stack/agent-skills/skills/thinking-model-answering/
standards-stack/llm-wiki/thinking-models/
```

For `ai-organization-operating-model`, teammates should copy both the skill and its compiled Wiki:

```text
standards-stack/agent-skills/skills/ai-organization-operating-model/
standards-stack/llm-wiki/ai-organization-methodology/
```

For product-design work, teammates should start from the product design skill pack:

```text
standards-stack/agent-skills/PRODUCT_DESIGN_SKILL_PACK.md
modules/product/README.md
work/2026-06-02-product-design-skill-summary/summary.md
```

The pack explains which project skills to copy, which product-design sources to keep available, and where not to place product-design evidence.

## Safety Checks

Before sharing the package with teammates:

```bash
git diff --check
find standards-stack/agent-skills/skills -maxdepth 2 -name SKILL.md -print | sort
rg -n "AKIA|ACCESS_KEY|SECRET|TOKEN|PASSWORD|PRIVATE KEY|BEGIN RSA|BEGIN OPENSSH" \
  AGENTS.md HEARTBEAT.md README.md standards-stack/agent-skills \
  --glob '!CODEX_TEAM_SKILL_HANDOFF.md'
```

The last command is a coarse scan. Review any hits manually before sharing.
