add-to-global-trigger
Route proposed additions to the global Codex control plane by deciding whether a request belongs in `~/.codex/AGENTS.md`, a global workflow or reference doc under `~/.codex/docs`, `~/.codex/bin/workflow.py`, or an enforceable non-prose surface. Use when asked to "add this to global AGENTS", "promote this workflow to global", "add a new global trigger", or decide whether something should be a trigger, workflow, reference, hook, lint rule, or runtime guard.
What this skill does
# Add To Global Trigger ## Overview Use this skill to add or refuse additions to the global Codex trigger layer without blurring surface ownership. Decide the owner surface first, then edit only the surfaces the request actually needs. Global scope only: - `~/.codex/AGENTS.md` - `~/.codex/docs/` - `~/.codex/bin/workflow.py` Do not use this skill for repo-local `AGENTS.md` work. ## Decision Order 1. Run `workflow summary placement`. 2. Search existing global docs, skills, and trigger lines before adding anything. 3. Classify the request into exactly one primary owner: - `AGENTS.md` for a short, stable routing rule that points to an existing durable target. - `docs/workflows/` for a runtime multi-step process. - `docs/references/` or `docs/quality-gate/` for authoring guidance, checklists, or validation rules. - hooks, lint, deny rules, or runtime config when the behavior is deterministic and enforceable. - `skills/` when the request is a reusable method with judgment. 4. Author the durable target before adding the trigger that points to it. 5. Edit `~/.codex/AGENTS.md` last. If the request is longer than three short lines of stable instruction, do not put the full content in `AGENTS.md`. Create or update the owning surface and add only a compact trigger. ## Search Before Writing Run targeted retrieval before editing: ```bash workflow list workflow search "<topic>" rg -n "<topic>|<candidate-name>" ~/.codex/AGENTS.md ~/.codex/docs ~/.codex/skills -g '*.md' ``` Collapse duplicates instead of creating parallel guidance. If an existing doc or skill already owns the concept, update that surface rather than adding a new one. ## Surface Rules ### Trigger Only Choose this path only when all of the following are true: - the durable target already exists - the rule is stable and short - the trigger can route through `workflow summary <doc>` or another existing surface - no new enforcement or new method is required Before editing `~/.codex/AGENTS.md`, run: ```bash workflow summary agentmd-quality-gate ``` ### New Workflow or Reference Doc Choose a new doc when the trigger needs a durable target. - Use a workflow doc for runtime execution steps. - Use a reference or quality-gate doc for authoring guidance or checklists. Before creating the doc, run: ```bash workflow summary workflow-doc-creation ``` Do not describe global doc creation as a reindex task. Global docs are discovered by filesystem scan. ### Workflow CLI Alias Support Edit `~/.codex/bin/workflow.py` only when the new doc needs first-class short-name support through `workflow summary <name>`, `workflow read <name>`, or other alias-based routing. Before changing `workflow.py`, run: ```bash workflow summary workflow-cli-quality-gate ``` Measure before and after for the command path you changed. Treat alias support as a CLI surface change, not just a doc change. ### Enforced Instead of Prose Do not add prose when the request is really about blocking or mechanically steering behavior. Prefer: - `rumdl` for recurring Markdown misuse - `ruff` for recurring Python misuse - hooks or deny rules for unsafe actions - runtime config for hard restrictions If you route to enforcement, explain briefly why the request should not become a global trigger or doc. ## Authoring Order Follow this order exactly: 1. `workflow summary placement` 2. search existing global surfaces 3. if creating a doc, `workflow summary workflow-doc-creation` and author the doc 4. if alias support is needed, `workflow summary workflow-cli-quality-gate` and update `~/.codex/bin/workflow.py` 5. if editing `AGENTS.md`, `workflow summary agentmd-quality-gate` 6. add or update the global trigger line in `~/.codex/AGENTS.md` 7. run validation for every touched surface Use the exact command sequences in [surface-matrix.md](references/surface-matrix.md). ## Validation Always validate the surfaces you touched. - `~/.codex/AGENTS.md` changed: - verify the line is concise, bounded, and points to an existing target - global doc created or edited: - `workflow registry` - `workflow lint` - `~/.codex/bin/workflow.py` changed: - `workflow lint` - `workflow lint --full` - `python3 -m unittest discover -s /Users/gurusharan/.codex/tests -p 'test_workflow_cli_regression.py'` - manual check that `workflow summary <alias>` works If `workflow registry` shows unrelated pre-existing drift, report it but do not fix it unless the requested change depends on it. ## Refusal Cases Refuse or reroute when: - the request is repo-local rather than global - the content is session-specific - the content is derivable from code or git history instead of deserving a durable doc - the request wants prose where enforcement is the right owner - the new trigger would duplicate an existing global trigger or doc
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.