Code Task 标志

Code Task

组织热门
TokenRhythm
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.

概览

发布者TokenRhythm
代码仓库opensquilla
技能名称code-task
星标数
7K
复刻数
566
附带文件
仅含指令
许可协议Apache-2.0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 TokenRhythm 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Code Task AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/TokenRhythm/opensquilla/tree/main/src/opensquilla/skills/bundled/code-task
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TokenRhythm/opensquilla.git /tmp/opensquilla
mkdir -p .claude/skills
cp -r /tmp/opensquilla/src/opensquilla/skills/bundled/code-task .claude/skills/code-task
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Code Task,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Code Task。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Code Task 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 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 means a wrong fix.
  • usage: cost / tokens (aggregated across internal retry attempts).
  • attempts / max_attempts / retry_exhausted: code-task RETRIES internally when its own verification fails -- it re-runs the agent on the SAME prepared repo (no re-clone, no re-explore) with the concrete failure fed back, up to max_attempts. A returned result is FINAL across those internal attempts.
  • relaunch_recommended is always false and final_failure_reason explains a failure: do NOT re-launch the same task yourself on a failed result -- the internal retries are already exhausted. Surface the failure to the user.

What to tell the user

  1. Up front: cloning + dependency install + the agent loop can take several minutes; you'll report when done.
  2. After: report state, what changed (diffstat), the acceptance red→green evidence, any assumptions, the cost, and where the branch/diff lives.
  3. On failed / environment_blocked: quote error / final_failure_reason and point at the agent_stdout.log. Do NOT relaunch the same task yourself -- code-task already retried internally (see retry_exhausted).

Constraints

  • Runs on the gateway host — git, the toolchain, and disk all come from there. Works the same from TUI, Web UI, or any channel.
  • v1 is host-only and always clones fresh (no --in-place). For untrusted repositories, a Docker-isolated backend is planned but not in v1.

Verification modes

code-task solve defaults to --verification-mode red-green: the agent writes acceptance tests, the runner proves red on the base and green on the change, then runs regression.

For building an app or UI from scratch (e.g. an Electron + Vite + React desktop app) there is no red->green test loop. Use --verification-mode build: the runner owns a fixed checklist (npm ci -> npm run build -> npx electron-builder for the HOST OS, with the target pinned — --mac dmg -> .dmg, --win nsis -> .exe, --linux AppImage -> .AppImage) and state=verified means the app actually builds and packages into an installer. Each OS only builds its own installer, so run on each OS (or a CI matrix) to collect all three. The result carries verification_kind=build and build.installer_path(s). Preview/launch is intentionally out of scope (no GUI is run).

For self-contained, testable code when the user has not named a repo, use --verification-mode scratch with --task or --task-file and no --repo. The runner creates an empty git repo, asks the agent to write code plus pytest coverage, and independently reruns the declared acceptance command. This mode is green-only and returns verification_kind=scratch.

常见问题

Code Task AI 技能有什么作用?

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 n...

为什么在 TypingMind 中使用 Code Task?

因为您只需安装一次,就能搭配任何模型使用。Code Task 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Code Task?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/TokenRhythm/opensquilla/tree/main/src/opensquilla/skills/bundled/code-task。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Code Task?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Code Task 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Code Task 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Code Task AI 技能免费吗?

是的。TokenRhythm 已在 GitHub 上根据 Apache-2.0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇