Skip to main content
ClaudeWave
Skill6.9k repo starsupdated 2d ago

code-task

PREFERRED way to change code in a REAL repository: fix a GitHub issue, fix a bug, add/implement a function or feature, or make any edit to a project the user names by a filesystem path (e.g. /tmp/foo, ~/code/bar) or a git URL. Clones the repo, runs an OpenSquilla agent on the host to make the change on a task branch, then independently VERIFIES it with a red→green→regression test loop and reports a structured result. STRONGLY prefer this over hand-editing the user's files yourself in this session: editing files directly skips the isolation and the runner-verified red→green proof, so it is not equivalent. Use it whenever the request names a real on-disk repo/path or a repo URL and asks to fix/add/implement/change code. Examples: 'fix issue 412 in github.com/acme/widgets', '给 /tmp/calc 加个 average 函数', '帮我改一下 ~/proj 里的 X', 'implement CSV export in my project'. Docker-free host execution; treat the target repo as TRUSTED. GitHub issue mode needs the `gh` CLI. For self-contained, TESTABLE code from scratch when NO repo is named (e.g. 'write a function that maps A-Z to pitches'), use `--verification-mode scratch` with no --repo: it scaffolds a throwaway project, writes the code plus a test, and verifies it green. Only truly trivial one-liners or conceptual/non-testable questions are answered inline.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/opensquilla/opensquilla /tmp/code-task && cp -r /tmp/code-task/src/opensquilla/skills/bundled/code-task ~/.claude/skills/code-task
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# code-task

Solve a real-repository coding task end to end: clone the repo to a
disposable working directory, run an OpenSquilla agent to make the change on
a task branch, then **independently verify** it with a red→green→regression
loop. Host mode (no Docker) in v1.

## Use this — do not hand-edit the repo yourself

When the user asks to fix/add/implement/change code in a repository they
name by path or URL, route it through `opensquilla code-task solve` — even
if the change looks small enough to do by hand. Editing the files yourself
in this session is **not equivalent**: it skips the disposable clone, the
task branch, and (most importantly) the runner-verified red→green→regression
proof, so neither you nor the user gets evidence the change actually works.
Answer inline (no code-task) ONLY for truly trivial one-liners, pseudocode, or
conceptual / non-deterministic questions. For self-contained TESTABLE code from
scratch with no repo named, use `code-task solve --task "..." --verification-mode
scratch` (no --repo): it writes the code plus a test and verifies it green-only
(no red/regression -- there is nothing pre-existing to regress). When a real repo
is named, prefer code-task red-green.

## Translating the user's request

The user speaks naturally ("fix issue 412 in github.com/acme/widgets",
"add CSV BOM support to my project at ~/code/foo"). Map that to the command:

```
opensquilla code-task solve --repo <url-or-path> ( --issue N | --task "<text>" | --task-file <path> ) [--yes]
```

> Invocation: do NOT assume a bare `opensquilla` (or bare `python`) is on PATH —
> the gateway commonly runs from an absolute interpreter path. When coding mode
> is active it injects the EXACT, resolved, PATH-independent command: use ONLY
> that. Otherwise invoke via an ABSOLUTE interpreter, e.g.
> `/abs/path/python -P -m opensquilla.cli.main code-task solve ...`. Never
> `pip install` OpenSquilla or run an installer to "get" the command; if it
> cannot be run, stop and report the environment is broken.

- **A GitHub issue** → `--issue N` (needs `gh`; see below).
- **A short request in the message** → `--task "<their request>"`.
- **A long spec, or pasted from Jira/GitLab/内网** → save it to a file and
  use `--task-file <path>`.
- Pass `--repo` for changes to an EXISTING repo. Omit it for
  `--verification-mode scratch` (from-scratch code) and for a from-scratch
  `--verification-mode build` (a brand-new app) — both scaffold their own repo.
  If the user is already in a local checkout, use that path; otherwise the URL.
- Pass `--yes` to skip the interactive trusted-host confirmation (you are
  acting on the user's behalf), but only after the safety check below.

## Before you run — two checks

1. **Trusted repo**: code-task runs an agent on the host that may install
   dependencies and execute the repo's code. It is NOT a sandbox. Only run
   it against repositories the user trusts. If the repo's provenance is
   unclear, ask first.
2. **Enough information**: you must be able to state the expected behavior
   change ("what is wrong/missing now, what should be true after"). If the
   request is too vague to write an acceptance test for, ask the user to
   clarify BEFORE running — do not burn a run on a guess.
   - **Build-from-scratch (`--verification-mode build`)** has no acceptance
     test. Decide by whether you know WHAT THE APP SHOULD DO, not just its kind.
     If the request is only a broad app type/goal with no concrete features,
     target user, or scope (e.g. "make me an English-learning app", "a drawing
     app"), ask 1-2 focused questions (core features/screens and who it's for),
     then STOP — do not run code-task until answered. If it already names
     concrete features, scope, or target users, do NOT ask — build it with
     sensible defaults and state your assumptions. Never ask about
     platform/framework/styling. At most 2 questions; never interrogate.

## GitHub issue mode needs `gh`

`--issue` shells out to the GitHub CLI (`gh`). If `gh` is missing or not
authenticated, tell the user to `gh auth login`, or fall back: have them
paste the issue text and use `--task` / `--task-file` instead. The issue
body AND comments are pulled in (comments often hold the repro steps).

## While it runs — watch the run dir, not the source repo

code-task clones the `--repo` source into an isolated run directory and does
all its work there. The **source repo stays empty until a run finishes and
VERIFIES**, at which point (build mode, local source) the change is committed
back. Therefore:

- Do NOT judge progress by the source repo's contents, and do NOT conclude the
  run is "stuck" because the source still looks empty — that is expected.
- A run takes several minutes. Let it finish: `process(action="wait")` on the
  background session. Do NOT kill it, do NOT "clean and retry", and do NOT
  launch the same task again while one is still running.
- The run prints its run directory on startup and writes a live
  `<run_dir>/status.json` (phase = preparing → agent_running → collecting_change
  → verifying → completed). Watch that if you want progress.
- Decide success only from the returned result `state` and
  `build.installer_path` (which points into the run dir, not the source).

## Reading the result

`--json` prints a result object; key fields:

- `state`: `verified` (acceptance test went red→green, no regressions),
  `already_satisfied` (the behavior already held on the base commit),
  `not_testable` (work done but not expressible as a test),
  `environment_blocked` (could not build/test the repo),
  `invalid_acceptance_test` (agent produced no valid verification manifest),
  `failed` (acceptance not green or a regression appeared).
- `branch`, `commits`, `files_changed`, `diffstat`, `patch_path`.
- `acceptance`: each test with `before`→`after` (e.g. `fail`→`pass`).
- `regression`: existing-suite result and `new_failures`.
- `assumptions`: **surface these to the user** — a wrong assumption me
advanced-dubbing-studioSkill

Submit audio or video for multilingual dubbing, poll status, and download dubbed audio. Use when the user asks for dubbing, 多语言配音, 视频翻译配音, 译制片, or wants a source clip dubbed into another language.

ai-video-scriptSkill

Generate a structured short-video shooting script from a topic. Emits a strict, machine-parseable shot list (3 shots by default) with image prompt + video prompt + voiceover + on-screen text per shot. Trigger when the user asks for a video script, 分镜, 短视频文案, AI视频, 短剧脚本, or wants visual prompts ready for image/video generation.

cronSkill

Use when the user asks to schedule recurring tasks, one-off reminders, timers, or cron-style jobs through the OpenSquilla cron tool.

deep-researchSkill

Multi-round research with explicit methodology, evidence tracking, and citation-tagged synthesis. Trigger on 'deep dive', 'research report', 'literature review', 'investigate X across sources', 'multi-round investigation'. Distinct from the `summarize` skill, which is a single-pass condensation; this skill maintains a state file across iterations, tracks coverage, and produces a long-form report with per-claim citations. Three execution stages: plan (scope into sub-questions), iterate (record evidence per round), compile (synthesize report). The skill itself does not fetch the web — it tells the host agent which fetches to perform via OpenSquilla's existing web tools, and records what comes back.

docxSkill

Read, edit, or create Microsoft Word `.docx` files. Trigger this skill whenever the user mentions a Word document, .docx file, contract, report, brief, memo, or asks to extract text, modify an existing doc, generate one from a brief, or audit tracked changes. Three execution paths: text-and-structure extraction, in-place edit-by-run (preserves styles), and create-from-scratch with python-docx. Falls back to OOXML unzip-and-patch for layout work python-docx cannot reach.

git-diffSkill

Capture the current git diff (staged, working-tree, or staged file list) as text. Direct shell call for workflows that need repository diffs without an LLM agent loop.

githubSkill

GitHub operations via `gh` CLI: issues, PRs, CI runs, code review, API queries. Use when: (1) checking PR status or CI, (2) creating/commenting on issues, (3) listing/filtering PRs or issues, (4) viewing run logs. NOT for: complex web UI interactions requiring manual browser flows (use browser tooling when available), bulk operations across many repos (script with gh api), or when gh auth is not configured.

history-explorerSkill

Query the per-turn DecisionEntry log for skill co-occurrence patterns, meta-skill usage stats, and the router fixture corpus. Returns a JSON summary suitable for downstream LLM consumption. Used by meta-skill-creator's harvest step but also useful standalone for 'which skills did I use most this week?'