SkillAtlasSkill 详情

soku

Give any AI agent a secure command line to your growth stack.

审核状态:已审核Quality 72Security 70

复制安装命令

用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。

复制前请先查看来源、License 和安全提示。

项目 README

来源文件:README.md

抓取于 2026年8月13日
Soku

Soku CLI

Give any AI agent a secure command line to your growth stack.

Query marketing data, manage campaigns, publish SEO content, and automate
recurring work from Claude Code, Codex, Cursor, or any terminal.

npm version Node.js 20 or newer MIT license

Website · Agent guide · npm · Contributing


Soku CLI turns the tools and data already connected to your Soku workspace into typed, discoverable commands. An agent can move from a question to an answer—or from a plan to a human-approved action—without you copying data between tabs, sharing API keys, or running an MCP host.

Why Soku CLI?

  • One interface for your growth stack. Work with Google Ads, Meta Ads, ChatGPT Ads, GA4, PostHog, SEO Hosting, automations, Context Hub, and more.
  • Built for agents, useful in a shell. Commands are self-documenting, and non-interactive output uses a stable JSON envelope that agents and scripts can parse reliably.
  • Credentials stay out of prompts. Soku handles authentication and can inject connected third-party credentials server-side.
  • Writes have a human gate. Delivery-changing ads operations create a review request before anything goes live.
  • New capabilities arrive automatically. The typed command tree is generated from Soku's capability registry, with soku call as a forward-compatible escape hatch.

Quick start

Let your AI agent set it up (recommended)

Paste this into Claude Code, Codex, Cursor, or another coding agent:

Read https://soku.ai/cli/skill.md, install or update Soku CLI, sign in,
select my workspace, and install all business skills.

The agent guide walks the agent through installation, device login, workspace selection, skill installation, and a first capability check.

Set it up manually

# Install globally (Node.js 20+)
npm install -g @soku-ai/cli

# Sign in with the browser-based device flow
soku auth login

# Find and select a Soku brand workspace
soku workspace resolve <brand>
soku workspace use-brand <brand>
soku workspace status

# See everything available to you
soku --help

No global install needed? Start with npx @soku-ai/cli --help.

What can you do with it?

Turn ad data into answers

Start with cached, normalized reporting across supported ad platforms:

soku ads list-ad-accounts --platform google

soku ads query-single-dimension \
  --platform google \
  --account-id <account_id> \
  --dimension campaign \
  --date-start 2026-06-01 \
  --date-end 2026-06-30

Use the same workflow for Meta, TikTok, or ChatGPT Ads, or reach for Google Ads GAQL when you need a custom breakdown.

Understand acquisition and product behavior together

# Website acquisition and conversion
soku ga4 list-properties
soku ga4 get-property-overview --property-id <property_id>
soku ga4 list-traffic-sources --property-id <property_id>

# Product behavior
soku posthog list-projects
soku posthog query \
  --project-id <project_id> \
  --tool execute-sql \
  --arguments '{"query":"SELECT count() FROM events WHERE event = '\''$pageview'\''"}'

This makes it possible for an agent to investigate the path from campaign spend to site traffic to in-product behavior without asking you to export CSV files.

Create campaign changes with a human in control

soku ads meta campaign create \
  --account-id <meta_account_id> \
  --name "Launch Test" \
  --objective OUTCOME_TRAFFIC \
  --summary "Create paused Meta traffic campaign Launch Test"

Delivery-changing writes return a review ID instead of executing immediately:

soku review show <review_id>
soku review approve <review_id>

An agent can prepare the exact change and explain it; a human still decides whether it runs.

Publish and automate growth work

# Publish a complete HTML page through Soku SEO Hosting
soku seo-hosting pages put \
  --section blog \
  --slug launch-notes \
  --title "Launch notes" \
  --html-file page.html
soku seo-hosting pages publish --section blog --slug launch-notes

# Schedule a recurring agent task
soku automation create \
  --name "Weekly account health" \
  --prompt "Review paid acquisition performance and flag anomalies" \
  --cron "0 9 * * 1" \
  --timezone America/Los_Angeles

# Add source material to the workspace Context Hub
soku context upload ./campaign-brief.pdf --dir research

Agent-native by design

In a non-interactive shell, every command returns a predictable JSON envelope:

{"ok":true,"data":{"...":"..."}}

Errors use the same shape and a non-zero exit code:

{"ok":false,"error":{"code":"...","message":"..."}}

Install Soku's agent skills to give your agent the workflows and guardrails behind the commands—not just their names:

soku skill install --all --global
soku skill list
soku skill status

The bundled meta skill is available at skills/soku/SKILL.md.

Command map

AreaStart hereTypical use
Authenticationsoku auth --helpSign in, sign out, and check session state
Workspacesoku workspace --helpResolve and switch organization/brand context
Advertisingsoku ads --helpQuery reporting data and prepare reviewed writes
Analyticssoku ga4 --help, soku posthog --helpAnalyze acquisition, conversion, and product behavior
SEO Hostingsoku seo-hosting --helpStage, publish, and manage SEO pages and domains
Automationssoku automation --helpSchedule and inspect recurring agent work
Context Hubsoku context --helpOrganize files an agent can use as context
Secure egresssoku egress --helpCall supported third-party APIs without exposing keys
Reviewssoku review --helpInspect and decide on gated operations
Skillssoku skill --helpInstall and update Soku workflows for AI agents

Run soku <namespace> <action> --help before an unfamiliar call. Typed command names use kebab-case; raw capability names used with soku call use snake_case.

How it works

The CLI talks to Soku over /api/cli/*; it does not require an MCP host. Its typed commands are generated from src/generated/capabilities.json, which is synced automatically from the Soku backend. Do not edit that file by hand.

If a newly released capability does not yet have an ergonomic typed command, you can still discover it and call it directly:

soku call ads list_ad_accounts -p platform=google
soku call <namespace> <action> --help

Development

pnpm install
pnpm typecheck
pnpm test
pnpm build

The project is TypeScript with ESM and NodeNext module resolution. Tests are colocated as *.test.ts files and run with Node's built-in test runner. keytar is optional; when it is unavailable, credential storage falls back to a file-backed store.

Contributing

Issues and pull requests are welcome. Read CONTRIBUTING.md and our Code of Conduct before contributing. Please use SECURITY.md to report security issues.

License

MIT © About Intelligence

其他

中风险

  • 来源需自行核对维护者身份。
  • 包含脚本或命令调用,安装前请复核。
  • 可能需要外部 token、网络权限或第三方服务。
  • 未检测到高风险命令。
  • 扫描发现:2 条。

Codex — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/About-Intelligence/soku-cli.git
  3. 将 "skills/soku" 文件夹复制到 Codex 的 skills 目录中。
  4. 重启 Codex 让新的 skill 生效。

Codex — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Codex 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Codex 让新的 skill 生效。

Claude Code — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/About-Intelligence/soku-cli.git
  3. 将 "skills/soku" 文件夹复制到 Claude Code 的 skills 目录中。
  4. 重启 Claude Code 让新的 skill 生效。

Claude Code — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Claude Code 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Claude Code 让新的 skill 生效。

Cursor — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/About-Intelligence/soku-cli.git
  3. 将 "skills/soku" 文件夹复制到 Cursor 的 skills 目录中。
  4. 重启 Cursor 让新的 skill 生效。

Cursor — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Cursor 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Cursor 让新的 skill 生效。

GitHub Copilot — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/About-Intelligence/soku-cli.git
  3. 将 "skills/soku" 文件夹复制到 GitHub Copilot 的 skills 目录中。
  4. 重启 GitHub Copilot 让新的 skill 生效。

GitHub Copilot — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 GitHub Copilot 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 GitHub Copilot 让新的 skill 生效。

Windsurf — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/About-Intelligence/soku-cli.git
  3. 将 "skills/soku" 文件夹复制到 Windsurf 的 skills 目录中。
  4. 重启 Windsurf 让新的 skill 生效。

Windsurf — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Windsurf 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Windsurf 让新的 skill 生效。
查看 SKILL.md 原文
name: soku
description: >-
  Use when calling Soku CLI capabilities from a shell: auth, workspace
  selection, ads/GA4/PostHog data reads, typed ads writes, SEO Hosting,
  automations, Context Hub files, migrating context or project files from
  Claude, temporary file publishing, brand skills, third-party egress,
  review-gated writes, skill installation, or CLI updates.
license: MIT
metadata:
  author: About Intelligence
  version: "0.4"

Soku CLI

The soku CLI is the shell-native way for an AI agent to use Soku from Claude Code, Codex, Cursor, or any terminal. It talks to Soku over /api/cli/*; no MCP host is required. Treat this file as the router. Load the relevant reference file before acting on a detailed workflow.

Reference Router

Read only the reference files needed for the user's task:

TaskRead
First-time setup, expired token, workspace selection, org/brand ambiguityreferences/auth-workspace.md
Ads, GA4, or PostHog reads; raw soku call; command discoveryreferences/data-capabilities.md and references/capability-flow.md
Meta/Google/ChatGPT Ads writes, uploads, bulk create, review-gated approvalreferences/ads-write.md
SEO Hosting, automations, Context Hub files, temporary public file URLsreferences/seo-automation-files.md
Third-party APIs through server-side credential injection; security rulesreferences/egress-security.md
Installing, updating, or removing Soku-managed local skillsreferences/skills-updates.md
Migrate context, project files, or workspaces from Claude into SokuRun soku skill install migrate-from-claude, then read the installed soku-migrate-from-claude skill.

For an installed business skill such as soku-ads-report, read that skill too. Business skills carry their own "Running this skill with the Soku CLI" section.

Default Flow

  1. Check auth/workspace state:
soku auth status
soku workspace status
  1. If auth is missing or expired, use the agent split-flow from references/auth-workspace.md.

  2. If the workspace is not ready, resolve and select the remote Soku brand:

soku workspace resolve <brand>
soku workspace use-brand <brand>
  1. Pick the reference for the task. Do not infer Soku org/brand from the current local repo directory.

  2. Inspect command help before unfamiliar calls:

soku --help
soku <namespace> --help
soku <namespace> <action> --help
  1. Run the command and parse JSON output. In non-TTY contexts, success is {"ok":true,"data":...} and errors are {"ok":false,"error":...}.

Non-Negotiable Rules

  • Never print or persist the Soku access token.
  • Never ask the user to paste third-party provider keys for covered providers.
  • Do not fail just because an upstream provider key env var is unset. Use soku egress -- curl ... for covered third-party APIs.
  • A human must authorize every review-gated write — but don't force a copy-paste. If your harness prompts for explicit human confirmation before each shell command (e.g. Claude Code's permission prompt), you MAY run soku review approve <id> yourself after showing the user the diff/summary; that confirmation prompt is the human gate. Never allowlist or auto-approve soku review approve/deny, and never approve a write the user has not seen. If your harness runs commands without per-command human confirmation, do NOT self-approve — surface the review_id for the user to run.
  • Pass user values as separate argv elements. Do not build a shell command by string-concatenating untrusted values.
  • Do not scan local repo files, AGENTS.md, or context/ folders for Soku workspace state unless the user explicitly asks about local files.
  • When a command prints a hint, follow it before retrying. Do not loop blindly.

Exit Codes

ExitMeaningWhat to do
0SuccessParse data.
1Usage or no workspaceFix args, or run soku workspace status / use-brand.
2Auth missing, expired, or revokedRun soku auth login --no-wait.
4Not found or unknown capabilityRe-check soku --help / soku <ns> --help.
5Runtime or network failureRetry if transient; if behind a proxy set ALL_PROXY.

Capability Discovery

Typed command names are kebab-case:

soku ads query-single-dimension --help

Raw soku call action names use registry snake_case:

soku call ads query_single_dimension --payload '{"account_id":"123","dimension":"campaign"}'

Prefer typed commands when they exist. Use soku call only as a forward-compatible escape hatch for a newer action or an action not yet exposed ergonomically.

Installed Skill Names

The bundled CLI meta skill is named soku. Business skills are installed with a Soku prefix, for example soku-ads-report and soku-google-ads.

soku skill list
soku skill install ads-report google-ads
soku skill status

When asking an AI client to invoke a business skill, write use @soku-ads-report skill, not @ads-report.

Updating This Skill

soku update skills refreshes the bundled soku meta skill and every installed Soku-managed business skill recorded in .soku-skills.json. It also refreshes legacy meta-only installs that have soku/SKILL.md but no manifest, so older installations receive this references/ directory.

soku update cli also silently refreshes an already-installed global soku meta skill as an npm postinstall side effect. Its JSON result carries mustRereadMetaSkill: true plus metaSkillRefreshed: [<paths>] when that happened. After running soku update cli, check that field: if true, re-read this file (and references/) from the listed path before continuing — do not keep acting on this session's previously loaded copy of this skill.

发现问题?提交给管理员复核

评分:

评论 (0)

暂无评论,成为第一个评论者吧!