| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 2.8 KB |
SKILL.md
View on GitHub---
name: ops-diff
description: Compare Local vs Remote State
---
# /ops-diff — Compare Local vs Remote State
You are executing a **diff** operation: comparing assembled local files (`src/` + overlay + patches) against the last pulled remote state (`state/{env}/{scope}/`).
This skill is a thin wrapper around the ade-ops CLI: `python -m core.cli diff`.
## Usage
```
/ops-diff # interactive — ask for env and scope
/ops-diff dev notebooks # diff notebooks for dev
/ops-diff cert notebooks # diff notebooks for cert
/ops-diff prod power_bi # diff power_bi for prod
/ops-diff cert notebooks --file foo.py # filter to a specific file
```
## Arguments
- `$ARGUMENTS` — optional: `{env} {scope}` with optional `--file {filter}`
Parse arguments from: `$ARGUMENTS`.
## Behavior
### Step 1: Resolve Project
Find the active project (nearest ancestor of cwd with `config/project.yaml`).
Pass it via `--project {project_root}` to the CLI.
### Step 2: Resolve Environment & Scope
If not provided, ask the user. Use `python -m core.cli status` to list available env × scope combinations.
### Step 3: Check State Exists
If `state/{env}/{scope}/` is empty or missing, the CLI will warn. Surface:
> No state for {env}/{scope}. Run `/ops-pull {env} {scope}` first to download the current remote state.
Do not proceed without state — diff needs something to compare against.
### Step 4: Execute Diff
```bash
python -m core.cli diff --project {project_root} --env {env} --scope {scope}
```
Optional flags:
- `--filter {pattern}` to narrow to specific files
- `--no-content` to suppress unified diff output (summary only)
For `all`, iterate over the project's scopes.
### Step 5: Interpret & Report
The CLI summary uses these markers:
| Marker | Meaning |
|---|---|
| `+` (local-only) | Files in assembled `src/` not in state — would be **added** by push |
| `-` (remote-only) | Files in state not in assembled `src/` — exist remotely but not locally |
| `~` (modified) | Files differ between local and state — would be **updated** by push |
| `=` (identical) | Files match — no action needed |
After the diff, suggest next steps:
- Changes present → "Run `/ops-push {env} {scope}` to deploy."
- In sync → "No changes to push."
- Remote-only files → "These exist remotely but not in `src/`. Push **will not delete them** — manual cleanup if unwanted."
## Safety
- Diff is **read-only**. Reads `src/`, overlays, patches, and `state/`. Writes nothing.
- Always safe to run. No confirmation needed.
## Error Handling
- **No state** → direct user to `/ops-pull` first
- **Empty src/** → warn that everything will show as remote-only
- **Overlay not found** → show the error, suggest checking `overlays/`
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |