link
Use this skill to turn a markdown file into the current task's durable source of truth.
Workflow
- Resolve the note path from the user's argument. Require a concrete
.md path; expand ~; preserve existing frontmatter and user-authored content.
- Resolve the current Codex session id.
- Add
session: <session-id> to the note's YAML frontmatter. If the note has no frontmatter, create one.
- Ensure the note has these sections, in this order when creating a new body:
## Summary
## Tasks
## Notes
## Log
- Write the task template into the note: concise summary, actionable checkbox tasks, notable findings under
## Notes, and timestamped notable events under ## Log.
- During the rest of the turn, update the linked note whenever you take a major action, verify a major finding, make a recommendation, hit a blocker, or materially change diagnosis.
- Before final response, skim the note and make sure the final answer matches the note's latest Summary / Tasks / Notes / Log.
Session Id
Resolve the session id in this order:
$CODEX_THREAD_ID, if set.
- The first
payload.id from the current ~/.codex/sessions/**/rollout-*.jsonl file, when the current session file is known.
- The newest matching
session_id from ~/.codex/history.jsonl, only when the current user request text is searchable there.
Use the frontmatter key exactly:
session: 019d6f5f-eb08-7052-b950-5038716be8da
If the note already has a different session:, do not overwrite it silently; add a Log entry and ask the user whether to replace it unless they explicitly requested replacement.
Note Template
Use this structure for new notes or sparse notes:
---
id: <preserve existing id or omit>
title: <preserve existing title or concise title>
desc:
tags:
status: ""
due: ""
updated: <epoch-ms when available>
created: <preserve existing created or epoch-ms>
session: <current-session-id>
---
## Summary
One or two concise paragraphs describing the task, current diagnosis / state, and verified scope.
## Tasks
- [ ] Concrete next task with enough context that another agent can resume it.
- [x] Completed task with the verified outcome, not just the activity.
## Notes
### Notable Findings
- Finding, evidence, and implication.
### Recommendations
- Task-shaped recommendation with owner / next verifier when known.
### Caveats
- Important uncertainty, residual risk, wrong turns, or evidence gap.
## Log
- YYYY-MM-DD HH:MM TZ: Created linked task note and associated session `<session-id>`.
- YYYY-MM-DD HH:MM TZ: Major action/finding/blocker.
Update Rules
- Keep
## Summary current; revise it when diagnosis changes.
- Keep
## Tasks task-shaped; use checkboxes; check off only verified completion.
- Keep
## Notes evidence-focused; include IDs, URLs, file paths, request IDs, timestamps, and code symbols when they matter.
- Keep
## Log append-only; use short timestamped bullets.
- Update an
updated: frontmatter field when it already exists. Prefer epoch milliseconds.
- Do not paste huge logs, raw transcripts, or long command outputs. Summarize the evidence and point to local artifact paths when useful.
- Do not replace a user's existing note wholesale. Patch the smallest section that keeps the task state accurate.
1---2name: link3description: Link the current Codex session to a durable Markdown task note.4---56# link78Use this skill to turn a markdown file into the current task's durable source of truth.910## Workflow11121. Resolve the note path from the user's argument. Require a concrete `.md` path; expand `~`; preserve existing frontmatter and user-authored content.132. Resolve the current Codex session id.143. Add `session: <session-id>` to the note's YAML frontmatter. If the note has no frontmatter, create one.154. Ensure the note has these sections, in this order when creating a new body:1617```markdown18## Summary1920## Tasks2122## Notes2324## Log25```26275. Write the task template into the note: concise summary, actionable checkbox tasks, notable findings under `## Notes`, and timestamped notable events under `## Log`.286. During the rest of the turn, update the linked note whenever you take a major action, verify a major finding, make a recommendation, hit a blocker, or materially change diagnosis.297. Before final response, skim the note and make sure the final answer matches the note's latest Summary / Tasks / Notes / Log.3031## Session Id3233Resolve the session id in this order:34351. `$CODEX_THREAD_ID`, if set.362. The first `payload.id` from the current `~/.codex/sessions/**/rollout-*.jsonl` file, when the current session file is known.373. The newest matching `session_id` from `~/.codex/history.jsonl`, only when the current user request text is searchable there.3839Use the frontmatter key exactly:4041```yaml42session: 019d6f5f-eb08-7052-b950-5038716be8da43```4445If the note already has a different `session:`, do not overwrite it silently; add a Log entry and ask the user whether to replace it unless they explicitly requested replacement.4647## Note Template4849Use this structure for new notes or sparse notes:5051```markdown52---53id: <preserve existing id or omit>54title: <preserve existing title or concise title>55desc:56tags:57status: ""58due: ""59updated: <epoch-ms when available>60created: <preserve existing created or epoch-ms>61session: <current-session-id>62---6364## Summary6566One or two concise paragraphs describing the task, current diagnosis / state, and verified scope.6768## Tasks6970- [ ] Concrete next task with enough context that another agent can resume it.71- [x] Completed task with the verified outcome, not just the activity.7273## Notes7475### Notable Findings7677- Finding, evidence, and implication.7879### Recommendations8081- Task-shaped recommendation with owner / next verifier when known.8283### Caveats8485- Important uncertainty, residual risk, wrong turns, or evidence gap.8687## Log8889- YYYY-MM-DD HH:MM TZ: Created linked task note and associated session `<session-id>`.90- YYYY-MM-DD HH:MM TZ: Major action/finding/blocker.91```9293## Update Rules9495- Keep `## Summary` current; revise it when diagnosis changes.96- Keep `## Tasks` task-shaped; use checkboxes; check off only verified completion.97- Keep `## Notes` evidence-focused; include IDs, URLs, file paths, request IDs, timestamps, and code symbols when they matter.98- Keep `## Log` append-only; use short timestamped bullets.99- Update an `updated:` frontmatter field when it already exists. Prefer epoch milliseconds.100- Do not paste huge logs, raw transcripts, or long command outputs. Summarize the evidence and point to local artifact paths when useful.101- Do not replace a user's existing note wholesale. Patch the smallest section that keeps the task state accurate.