deepwork-guardrail
Add, remove, replace, or list hard guardrails for the active deepwork session
What this skill does
# Deepwork Guardrail Management
Manually manage the `state.json.guardrails[]` array for the active deepwork session. Guardrails are rendered into every subsequent teammate spawn as `{{HARD_GUARDRAILS}}`.
## Arguments
The `args` string passed to this skill is one of:
- `add [--source <src>] "<rule text>"` — append a guardrail. `--source` defaults to `"user"`; override with values like `"scope-boundary"`, `"orchestrator"`, `"incident"` when the rule isn't a direct user-authored constraint.
- `remove <index>` — remove the guardrail at the given 0-based index (0-based to match state.json array order).
- `replace <index> [--source <src>] "<rule text>"` — overwrite the rule (and optionally the source) at 0-based index. Preserves the existing timestamp unless `--source` is supplied AND the existing source was a computed/auto source (`incident`, `flag`) — in which case the timestamp is refreshed to `now()` to reflect the re-attribution.
- `list` — show the current guardrails.
## Flow
1. Use Glob to find active instance state:
```
Glob: ${CLAUDE_PROJECT_DIR:-$(pwd -P)}/.claude/deepwork/*/state.json
```
2. If no active session, report "No active deepwork session. Run `/deepwork <goal>` first."
3. If multiple instances exist, use `AskUserQuestion` to pick which one (show goal + instance_id for each).
4. Parse the `args` string into the subcommand and its argument. Common shapes:
- `add "no kill signals"` (defaults to `source: "user"`)
- `add --source scope-boundary "plan-only scope: no target-repo edits"` (explicit source)
- `add no signals to host process` (unquoted; everything after `add` is the rule)
- `remove 2`
- `replace 3 "new rule text"` (preserves existing source)
- `replace 3 --source orchestrator "new rule text"` (changes source)
- `list`
`--source <value>` is optional for `add` and `replace`. Valid source values (convention, not validated): `user`, `incident`, `flag`, `scope-boundary`, `orchestrator`, `teammate`. Any non-empty string is accepted.
5. Perform the action:
### `add [--source <src>] "<rule>"`
Append a guardrail entry via the canonical writer:
```bash
STATE="${CLAUDE_PROJECT_DIR:-$(pwd -P)}/.claude/deepwork/<id>/state.json"
SOURCE="${SOURCE_OVERRIDE:-user}" # parsed from --source, default "user"
bash "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.sh" \
--state-file "$STATE" guardrail_add \
--statement "<rule>" \
--source "$SOURCE"
```
Report: "Added guardrail [source: <src>]: <rule>. Applies to all subsequent teammate spawns. Existing teammates don't see it until you re-spawn or DM them."
### `remove <index>`
Remove the guardrail at 0-based index via the canonical writer:
```bash
bash "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.sh" \
--state-file "$STATE" guardrail_remove --index <index>
```
Report which rule was removed, or error if the index was out of range.
### `replace <index> [--source <src>] "<rule>"`
Overwrite the rule at 0-based index via the canonical writer. Attribution is preserved by default — if `--source` is not supplied, the entry's existing `source` field is kept. If `--source` is supplied, the timestamp is refreshed to reflect re-attribution.
```bash
# SOURCE_OVERRIDE is empty if --source was not supplied
bash "${CLAUDE_PLUGIN_ROOT}/scripts/state-transition.sh" \
--state-file "$STATE" guardrail_replace \
--index <index> \
--statement "<rule>" \
$( [[ -n "${SOURCE_OVERRIDE:-}" ]] && echo "--source $SOURCE_OVERRIDE" )
```
Report: "Replaced guardrail [<index>] — source: <src>, new rule: <rule>."
### `list`
Read state.json.guardrails[] and print:
```
Guardrails for instance <id>:
0. <rule> [source: <source>, <timestamp>]
1. <rule> [source: <source>, <timestamp>]
...
```
If empty: "No guardrails currently set."
## Notes
- Auto-accumulated guardrails (from `hooks/incident-detector.sh`) have `source: "incident"` with an `incident_ref` field. User-added ones have `source: "user"`.
- Removing an auto-accumulated guardrail is fine — the user may judge the incident doesn't actually warrant a persistent rule.
- Flag-seeded guardrails (from `--guardrail` at invocation) have `source: "flag"`.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.