tercel/code-forge/port
Claude Code and agent skill by tercel/code-forge
- community
Checking that the SKILL.md file is still in the repository.
Port a documentation-driven project to a new target language — initializes project skeleton, analyzes reference implementation, and batch-generates plans for selected features. Use when converting a project to another language, rewriting in a different language, or creating a multi-language SDK from existing feature specs.
Install
npx vskill@latest install tercel/code-forge/portSKILL.md
Code Forge — Port
⚡ Execution Entry Point
@../shared/execution-entrypoint.md
For this skill: start at the first executable step. If you catch yourself about to say "falling back to manual port", STOP and go to the indicated step.
Port a project to a new target language by batch-generating implementation plans from shared feature specs.
When to Use
- Have a documentation project with feature specs (
docs/features/*.md) and want to implement in a new language - Have an existing implementation in one language and want to create another language version
- Need to batch-plan multiple features for a new language SDK
Command Format
Example:
Parameters
| Parameter | Required | Description | |
|---|---|---|---|
@<docs-project> | Yes | Path to documentation project containing docs/features/*.md | |
--ref <name> | No | Reference implementation project name (sibling directory) or absolute path | |
--lang <language> | Yes | Target language: java, typescript, go, rust, etc. |
Missing required parameters → use AskUserQuestion to collect interactively.
Workflow
Context Management
Step 2 and Step 6 are offloaded to sub-agents. Step 2 uses a single sub-agent to analyze the reference implementation. Step 6 dispatches one sub-agent per feature (serial) to generate plans. The main context retains only concise summaries.
Detailed Steps
Step 0: Configuration Detection and Loading
@../shared/configuration.md
Port-specific additions to Step 0:
- 0.2 additional defaults:
port.source_docs="",port.reference_impl="",port.target_lang="" - 0.4 note: During Steps 1-4 (before target project exists), config loading runs against the current working directory. After Step 5 creates the target project, subsequent steps use the target project's config.
Step 1: Parse Arguments and Discover Feature Specs
1.1 Resolve Docs Project Path
1.1.0 Path-Like Input Guard: If the docs project argument does NOT start with @ but looks like a path (contains /, starts with ., or matches an existing directory on disk), use AskUserQuestion:
- Options:
- "Yes, use as directory path" → prepend
@and continue - "No, this is not a path" → display usage instructions and stop
Parse the @<path> argument:
- Resolve to absolute path
- Validate directory exists
- Look for feature specs at
<docs-project>/docs/features/*.md - If none found, try
<docs-project>/features/*.md, then<docs-project>/*.md - If still none: display error with directory contents and stop
Store docs_project_path and feature_specs[] (list of absolute file paths).
1.2 Resolve Reference Implementation
If --ref <name> is provided:
- Try sibling directory:
<docs-project>/../<name>/ - If not found, try as absolute path
- Validate: directory exists and contains
planning/with at least one*/state.json - If invalid: warn
"Reference '{name}' not found or has no planning data. Continuing without reference."and setref_project_path = null
If --ref not provided: set ref_project_path = null.
1.3 Resolve Target Language
Validate --lang value. Recognized identifiers:
java,typescript(alias:ts),go(alias:golang),rust,python,csharp(alias:cs),kotlin,swift- Unrecognized value: warn and continue (do not reject — new languages are valid)
1.4 Derive Target Project Path
- Default:
<docs-project>/../<docs-name>-<lang>/(e.g.,../apcore-java/) - Display derived path and use
AskUserQuestion: - "Use
{derived-path}(Recommended)" — proceed - "Custom path" — user provides path
1.5 Display Discovery Summary
Proceed directly — no confirmation needed.
Step 2: Analyze Reference Implementation (Sub-agent)
Skip if `ref_project_path` is null.
Spawn an Agent tool call with:
subagent_type:"general-purpose"description:"Analyze reference implementation"
Sub-agent prompt:
Main context retains: Only the returned summary. Store as reference_summary.
Step 3: Display Feature List and User Selection
Build a feature display table combining discovered specs with reference data (if available).
With reference:
Without reference:
Use AskUserQuestion:
- Question: "Which features do you want to port to {lang}?"
- First option: "All features (Recommended)" — if selected, set
selected_featuresto the full list - Remaining options: one per feature — if the user wants multiple (but not all), run additional
AskUserQuestionrounds until they say "done"
Store selected_features[].
Step 4: Confirm Target Tech Stack
Use a single AskUserQuestion with up to 3 questions based on target language. Skip questions that have obvious single answers.
For Java:
- Question 1 — Build tool: "Maven (Recommended)" / "Gradle"
- Question 2 — Java version: "Java 17+ (Recommended)" / "Java 21+" / "Java 11+"
- Question 3 — Test framework: "JUnit 5 (Recommended)" / "TestNG"
For TypeScript:
- Question 1 — Runtime: "Node.js (Recommended)" / "Deno" / "Bun"
- Question 2 — Package manager: "pnpm (Recommended)" / "npm" / "yarn"
- Question 3 — Test framework: "Vitest (Recommended)" / "Jest"
For Go:
- Question 1 — Go version: "1.21+ (Recommended)" / "1.22+"
- Question 2 — Test extras: "Standard testing (Recommended)" / "testify"
For Rust:
- Question 1 — Async runtime: "tokio (Recommended)" / "async-std" / "None (sync only)"
- Question 2 — Serialization: "serde (Recommended)" / "Other"
For other languages: Ask a single open-ended question: "What tech stack and key libraries should be used for {lang}?"
Store tech_stack decisions.
Step 5: Initialize Target Project Skeleton
5.1 Create Target Directory
- If target directory already exists:
- Use
AskUserQuestion: "Target directory{path}already exists." - "Update config only (Recommended)" — overwrite
.code-forge.json, keep everything else - "Use as-is" — skip all initialization, jump to Step 6
- "Cancel" — stop
- If not exists:
mkdir -p <target-path>
Do NOT copy feature specs: Never copy docs/features/ or any feature spec files from the docs project into the target project. Feature specs are accessed from the source docs project via relative paths configured in directories.input. The target project must NOT contain its own copy of feature specs.
If the user explicitly requests local copies of feature specs, use AskUserQuestion to confirm before copying:
- "Copy feature specs locally (creates
docs/features/in target)" — copy and updatedirectories.inputto"docs/features/" - "Keep remote references (Recommended)" — do not copy, keep relative path in config
5.2 Generate .code-forge.json
Write to <target-path>/.code-forge.json:
Use relative paths from the target project to the docs and reference projects.
If no reference: omit reference_docs.sources and port.reference_impl.
5.3 Generate Project Skeleton (Sub-agent)
Spawn an Agent sub-agent (subagent_type: "general-purpose"):
Sub-agent prompt:
Verify skeleton files: After sub-agent completes, check that the following files exist in {target_path}:
- Build file (
pom.xml/package.json/go.mod/Cargo.toml/ etc.) .gitignoreREADME.md
If any are missing, create them directly in the main context. Do NOT skip this verification.
Also verify that docs/features/ does NOT exist in the target project. If it was created, delete it immediately.
5.4 Initialize Git Repository
Only if not already a git repo.
Step 6: Batch Generate Plans (Sub-agent per Feature, Serial)
Process each selected feature in order. Use dependency order from Step 2 reference summary if available; otherwise alphabetical.
6.0 Display Batch Header
6.1 Per-Feature Loop
For each feature in selected_features[]:
6.1.1 Check Existing Plan
If <target>/planning/<feature>/state.json exists:
- Display:
[{i}/{total}] {feature} — skipped (plan already exists) - Continue to next feature
6.1.2 Create Feature Directory
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/port/SKILL.md
Popularity
- Repository stars
- 2
- 7-day trend score
- 5
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 3 Apr 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tercel/code-forge/port)