Skip to content

About

Agent Skill for C3 (c3lang) project development: docs fetch, knowledge base, std::core/stdlib inspection, scaffold and build verification.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C3 Development Skill

An Agent Skill for building C3 (c3lang) projects with an evidence-driven workflow: fetch the official docs, build a searchable knowledge base, inspect the standard library, scaffold a project, and verify it with c3c.

What it does

  • Fetch / update / reuse c3-web — via git, gh, or a local checkout (offline-friendly).
  • Extract docs into a knowledge base — index.json, index.md, code-samples.json, manifest.json.
  • Inspect std::core — uses c3c compile --build-env to locate the current SDK and list the implicitly imported API.
  • Index the full standard library — parses the official C3 Docgen Viewer embedded JSON (linux-x64 / windows-x64 / macos-aarch64).
  • Scaffold C3 projects — prefers c3c init, falls back to built-in templates.
  • Build / test and diagnose — runs c3c build / c3c test, including a check for a common c3c stdlib conflict.

Requirements

  • Python 3.8+
  • git (for fetching c3-web)
  • gh (optional, for GitHub-based fetch)
  • c3c (optional for docs; required for build verification)

Windows note: use py or python if python3 is not available.

Install

git clone https://github.com/SmiteWindows/c3-development-skill.git

# CodeArts skills directory
cp -r c3-development-skill ~/.codearts/skills/c3-development

Or install from a release ZIP:

unzip c3-development.zip -d ~/.codearts/skills/

Quick start

# 1) get the docs repository
python3 scripts/fetch_c3_web.py --dest .c3/c3-web

# 2) build a local knowledge base
python3 scripts/extract_docs.py --source .c3/c3-web --out .c3/knowledge

# 3) inspect the implicitly imported std::core API
python3 scripts/inspect_std.py --json

# 4) search the full standard library
python3 scripts/extract_stdlib_docs.py \
  --html .c3/c3-web/docs/standard-library/docs.html --search printf --json

# 5) scaffold and verify a project
python3 scripts/scaffold_c3_project.py --name myapp --dest . --type exe
python3 scripts/verify_c3_project.py --path ./myapp --action build

Structure

c3-development/
├── SKILL.md
├── scripts/
│   ├── fetch_c3_web.py
│   ├── extract_docs.py
│   ├── inspect_std.py
│   ├── extract_stdlib_docs.py
│   ├── scaffold_c3_project.py
│   └── verify_c3_project.py
└── references/
    ├── workflow.md
    ├── c3-language-guide.md
    ├── c3-project-guide.md
    ├── c3-coding-rules.md
    ├── c3-std-core.md
    └── c3-stdlib-browser.md

Design notes

  • C3 implicitly imports std::core and its submodules. inspect_std.py uses c3c compile --build-env (the Stdlib line) instead of hard-coding a path, so it works across machines and compiler versions.
  • The official standard library viewer is a self-contained HTML file whose trailing EMBEDDED_JSON_LIST contains full API JSON for three targets. The online docs.json is not available (404), so extract_stdlib_docs.py parses the HTML.
  • Destructive operations refuse the filesystem root, the user home, and the current working directory. Output directories not created by these scripts require --force.
  • The docs knowledge base is rebuilt atomically: generate into a temporary directory, then replace the old one only on success.

Verification

  • Static validation: PASS (0 warnings / 0 failures)
  • Isolated review: 84 / 100, PASS_WITH_FIXES; the P1 and all P2 issues were fixed.
  • Real end-to-end evidence:
    • c3-web main@3b7332df → 56 docs / 469 C3 code samples
    • inspect_std.py on c3c 0.8.6 → 21 modules / 1038 declarations
    • official stdlib docs (windows-x64) → 173 modules / 8462 symbols
    • executable and static-lib projects build with exit 0 (after resolving a local c3c 0.8.6 stdlib conflict)
  • The standard library on this machine (c3c 0.8.6) has an internal std/math/easing conflict; verify_c3_project.py detects and reports it. It is a toolchain issue, not a project issue.

License

MIT — see LICENSE.

About

Agent Skill for C3 (c3lang) project development: docs fetch, knowledge base, std::core/stdlib inspection, scaffold and build verification.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages