CG Skill
SkillAI & modelsUse when a local agent needs to dispatch work to CommonGround, inspect turn or agent state, wait for a turn to close, or resume a suspended turn through the `cg` CLI instead of calling the CG HTTP API directly.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the CG Skill skill
What this skill tells your AI
The instructions your AI receives, as published by intelligent-internet/commonground in .agents/skills/cg/SKILL.md and read by ahel’s review.
Use the local cg CLI as the stable CommonGround interaction surface.
If cg is not available on PATH, stop and fix the local CLI setup. Do not fall back to direct HTTP calls.
The host should provide CommonGround auth through CLI-managed profiles. Legacy direct Agent credential env/config may exist for operators, but prompt-level skills should prefer --profile and must not read credential tokens.
Do not write credential tokens into request payloads, prompts, semantic records, or skill notes.
For open-source local demos, assume the operator has already prepared the default project cg-demo. If cg profile ensure-agent returns project_not_seeded, project_bootstrap_conflict, admin_service_credential_required, or profile_auth_required, stop and report the setup error. Do not try to repair project setup from the skill.
If the local CLI config or profile is missing, do not inspect token files or run setup commands. Ask the user/operator for the non-secret client connection facts needed to run cg: project id, agent id/profile, CommonGround service URL, Admin Service URL, and either an already prepared Admin Service bearer token file path or confirmation that the operator has written those values into CLI config. Never ask for a bearer token value in chat.
Allowed commands
cg dispatchcg turn getcg turn contextcg turn waitcg turn resumecg agent getcg profile ensure-agentcg report work-memory
When the task explicitly requires project-level discovery before choosing a CommonGround target, the skill may also use:
cg project agent listcg project offer listcg project offer get
Forbidden commands
cg setup project seedcg setup project statuscg setup project client-configcg kernelcg worker claim nextcg worker claim renewcg worker claim runcg worker claim appendcg worker claim finishcg worker claim dispatch-childcg worker claim suspend- direct
curlcalls to CommonGround HTTP API - direct
curlcalls to CommonGround Admin Service API - direct database or
PG_DSNsetup commands - reading credential token files directly
Rules
- Write request payloads to a JSON file first, then call
cg ... --payload-file <path>. - Read only the JSON envelope from
stdout. - On failure, inspect
error.codeanderror.message. - Treat
stderras non-contract logging. - If the failure indicates missing client config, profile, service URL, or Admin Service auth, ask for the missing client connection facts; do not ask for token contents.
cg turn waitis only for waiting until the turn reaches terminalclosed.- Do not treat
suspendedas terminal completion. - Use
cg turn resumeonly for explicit external approval or operator resume flows. - Use
result.final_record_roleandresult.final_payloadas the terminal result fields. - Do not infer final truth from intermediate semantic records.
- Do not call
cg workerfor prompt-level interaction logic. - Do not call
cg setuporcg kernel; project setup is an operator-only local action, not a prompt-level skill action. - Before dispatching to another agent, use project offer/agent discovery when the target is not already known. If no suitable CommonGround offer exists, report that CG delegation is unavailable rather than silently falling back to native subagents.
- Do not call
curlagainst the CommonGround HTTP API whencgcovers the operation. - When reporting work memory, write the manifest to a JSON file and use
cg report work-memory --manifest-file <path>. - Do not put claim tokens, registration credentials, or top-level
metainto a work-memory manifest. - Use a higher-level workflow skill such as
cg-work-memorywhen you need stricter work-memory manifest guidance; this base skill only defines the CLI safety contract.
Examples
Dispatch work:
cg dispatch \
--project-id cg-demo \
--requested-by frontside \
--target-agent nanobot \
--turn-kind turn.conversation.v1 \
--request-id req-123 \
--payload-file /tmp/cg-payload.json
Wait for terminal close:
cg turn wait \
--project-id cg-demo \
--turn-id T-123 \
--timeout-seconds 120 \
--poll-interval-ms 500
Read status:
cg turn get --project-id cg-demo --turn-id T-123
cg turn context --project-id cg-demo --turn-id T-123
cg agent get --project-id cg-demo --agent-id nanobot
cg project agent list --project-id cg-demo
cg project offer list --project-id cg-demo
cg project offer get --project-id cg-demo --agent-id nanobot --turn-kind turn.conversation.v1
Resume a suspended turn:
cg turn resume --project-id cg-demo --turn-id T-123 --requested-by operator
Ensure a local Agent profile:
cg profile ensure-agent \
--profile cg-demo/local-agent \
--project-id cg-demo \
--requested-agent-id local-agent \
--runtime-kind codex.local.v1 \
--display-name "Local Agent"
Report local work memory:
cg report work-memory \
--profile cg-demo/local-agent \
--project-id cg-demo \
--agent-id local-agent \
--manifest-file /tmp/work-memory-report.json
Signals
- GitHub stars
- 149
- Forks
- 21
- Last commit
- May 2026
Advanced
- Catalog kind
- skill
- Gateway key
cg- Source
- github.com/intelligent-internet/commonground