Porting Code to Ambler TS: The Quickest Way
The quickest way to port code from a Git repository into Ambler TS is to include it as a Git submodule and leverage Ambler’s agentic skills. In this guide, we’ll use the PocketFlow cookbook as an example of how to streamline this process.
Project Setup
First, let’s prepare the workspace by setting up the directory and adding the source repository as a submodule.
- Create a project folder
- Initialize git
- Add PocketFlow (or a Git repository of your choosing) as a submodule
- Install the Ambler TS skills
1
2
3
4
5
mkdir port
cd port
git init
git submodule add https://github.com/The-Pocket/PocketFlow.git
npx skills add argenkiwi/ambler-ts
Initialize Ambler
Use a coding agent (like Claude or Gemini) and invoke the ambler-init skill to set up the environment:
1
/ambler-init .
Port Code
Now, invoke the ambler-walk skill and provide the path to the specific logic you want to port. Ambler will handle the heavy lifting:
1
/ambler-walk create chat walk from @PocketFlow/cookbook/pocketflow-chat
The agent will automatically:
- Analyze the source logic.
- Create the necessary Nodes in
nodes/. - Scaffold a Spec in
specs/. - Wire everything into a Walk in
walks/.
Test Run
Once the agent finishes, you can verify the port immediately:
1
2
deno test nodes/tests/
deno task <walk-name>
By leveraging submodules and agentic skills, you can drastically reduce the manual effort required to migrate complex logic into the Ambler TS ecosystem.