RAW Agentic Coding: ZERO to Agent SKILL

RAW Agentic Coding: ZERO to Agent SKILL

Building Skills from Scratch

Introduction to Skill Development

  • Indydean introduces the video, emphasizing a return to foundational engineering principles by building a skill from scratch.
  • He reflects on his extensive experience with software and language models, highlighting the importance of skills in deploying prompts and code consistently.

Importance of Skills

  • The video will focus on creating a fork terminal tool, explaining its significance as they progress through the content.
  • Indydean aims to demonstrate how to build a skill without relying on existing frameworks or tools, focusing instead on raw agent coding.

Planning Before Execution

  • Emphasizing the need for planning, he sets aside his laptop to think through the problem before starting any coding.
  • He discusses the necessity of understanding the purpose and solution when developing new skills or prompts.

Defining Outputs and Structure

  • Indydean stresses defining concrete output structures at the beginning of an engineering project, which helps clarify deliverables.
  • He begins outlining the file structure for their new skill, including key directories like tools and prompts.

Directory Structure Overview

  • The main components include:
  • A tools directory for scripts and command-line tools that extend agent capabilities.
  • A prompts directory, crucial for defining user interactions within the system.
  • A cookbook, which serves as documentation for use cases and guides agents based on incoming prompts.

Functionality of Fork Terminal Skill

  • The fork terminal skill is designed to initiate new terminal instances capable of executing various commands (e.g., ffmpeg, G-cloud).
  • It will also allow launching agentic coding tools like Gemini Codeex Cloud Code once established.

Forking Terminal Windows for CLI Commands

Overview of the Fork Terminal Tool

  • The discussion begins with the intention to create a markdown file that serves as documentation for an agent's operation, specifically focusing on forking terminal windows to run new CLI commands.
  • The Gemini CLI tool is introduced, which will initiate new agents in forked terminals. This process involves summarizing the existing terminal before handing it off to a new agent.

System and Product Design Considerations

  • Emphasis is placed on developing a proof of concept (PoC) before moving to a minimum viable product (MVP). The PoC validates whether an idea can work effectively.
  • The speaker highlights that once the PoC is established, they plan to host the project publicly on GitHub, allowing others to follow along with the development process.

Purpose and Functionality of Forking

  • The primary function of this tool is to enable existing agents executing tasks to fork new windows where either new CLI commands or coding tools can be initiated.
  • A clear understanding of the purpose behind forking conversation windows is established: it allows offloading tasks and processes efficiently.

Planning and Execution Strategy

  • The importance of having a defined end state when working with agents is stressed. Relying solely on external tools without personal understanding can lead to dependency issues.
  • A call for engineers to maintain their cognitive skills amidst increasing reliance on technology; planning ahead ensures successful outcomes.

Development Process Initiation

  • With a solid plan in place, the speaker transitions into building out the project, indicating readiness to move from conceptualization into practical implementation.
  • Introduction of a new codebase titled "fork terminal skill CDN," emphasizing flexibility in choosing IDE tools as everything converges towards agent-based solutions.

Structuring Project Files

  • As part of setting up, there’s mention of creating directory structures and writing prompts clearly for user interaction within the system.
  • Discussion includes organizing files such as .gitignore, README files, and setting default variables like API keys necessary for functionality.

Agentic Coding Approach

  • Clarification about engaging in "inloop agentic coding," where both presence and effort are maximized while utilizing advanced tooling capabilities during development.

How to Build a Fork Terminal Skill

Overview of Agent Operations

  • The discussion begins with the importance of operating agents within the loop, emphasizing that many cloud tools are considered outloop agent coding tools.
  • It is highlighted that there’s no need for manual intervention in fixing small bugs or chores when using agents effectively.

Building the Fork Terminal Skill

  • The focus shifts to constructing the fork terminal skill, which serves as a pivotal file around which all work revolves.
  • The speaker expresses intent to build this skill from scratch without relying on meta prompts or orchestrator agents, showcasing a hands-on approach.

Skill Structure and Functionality

  • A snippet for writing skills is activated, leading to the creation of a clear description of what the fork terminal skill does and when it should be used.
  • The purpose of this skill is defined: to fork a new terminal session using raw CLI commands.

Enabling Features and Command Execution

  • A variable section is introduced where flags can enable or disable features like Gemini CLI and raw CLI commands.
  • Emphasis is placed on starting with simple command execution via raw CLI, particularly focusing on creating new terminals using OAS script on Mac devices.

Progressive Development Approach

  • The speaker advocates for a step-by-step approach rather than immediately deploying an agent, promoting progressive disclosure in instructions.
  • A structured workflow is proposed: understanding user requests, executing tools based on those requests, and providing examples for clarity.

Finalizing the Skill Implementation

  • The goal is set to create an operational skill by following concise steps that ensure functionality aligns with user needs.
  • Plans are made to convert the fork terminal skill into a concrete Python script capable of opening new terminal windows with specific commands.

Forking a Terminal and Building Skills

Introduction to Information Dense Keywords

  • The speaker introduces the concept of "information dense keywords" in programming, emphasizing their importance in conveying complex instructions succinctly.
  • A focus on creating a minimal working version of a Python file is highlighted, aiming for efficiency and clarity in coding practices.

Step-by-Step Skill Development

  • The speaker discusses the iterative process of skill development, stressing the need for clear definitions to enhance reusability.
  • Emphasis is placed on understanding user requests and executing commands precisely to eliminate confusion during skill execution.

Execution Workflow

  • The importance of specifying exact commands for execution is reiterated, ensuring that all variables function correctly based on user input.
  • The agent's workflow must be clearly defined to follow instructions accurately, which aids in achieving a functional first version of the skill.

Testing and Iteration

  • The speaker initiates testing by spinning up a new agent aware of the newly created skills, highlighting the necessity of validating functionality through prompts.
  • An error is identified when no available skills are displayed; this leads to correcting the format of the written skill for successful execution.

Debugging and Final Adjustments

  • After fixing formatting issues, the speaker successfully retrieves the fork terminal skill, demonstrating effective debugging practices.
  • A directory structure error is addressed as part of refining code; this showcases attention to detail necessary for successful implementation.

Proof of Concept and Cross-platform Considerations

  • The proof-of-concept phase involves running commands across different terminal windows while addressing potential discrepancies in command outputs.
  • Discussion shifts towards ensuring compatibility between Windows and Mac systems; there’s an expressed need for tools that facilitate cross-platform validation without switching devices.

Improving CLI Command Execution with Agent Understanding

Enhancing Workflow for Command Execution

  • The speaker discusses the use of Darwin Windows and suggests that PowerShell may be a better option, emphasizing the need to improve workflow by ensuring agents understand commands before execution.
  • The importance of having a help command (e.g., D-help) is highlighted, which provides information about how to use various CLIs, including Gemini. This understanding is crucial for effective command execution.
  • A trade-off between speed and context is introduced; agents should gather help documentation before executing commands to enhance performance, especially with new or changing tools like Gemini CLI.
  • The current operation of the agent relies on its best judgment. The goal is to provide clearer rules and instructions for executing commands effectively.
  • Instructions are simplified: before executing any command, the agent should run a help command to understand options available, aiming for a straightforward solution that ensures proper operation.

Testing New Terminal Commands

  • The speaker demonstrates activating the skill by booting up a terminal and running a raw CLI command (curl google.com), showing that the agent follows instructions step-by-step.
  • An access denied error occurs initially but is resolved by adjusting file permissions. This illustrates troubleshooting in real-time as part of the workflow improvement process.
  • After resolving issues, it’s confirmed that the agent successfully executed the curl command and adhered to provided instructions effectively.

Scaling Up Agent Functionality

  • Plans are made to open new terminal windows with specific prompts executed within them. Emphasis on starting fresh contexts for each task is reiterated as essential for clarity in operations.
  • The speaker outlines steps for using an OAS script to fire up a new terminal while prompting specific models (Haiku model in YOLO mode), showcasing how agents learn from documentation during execution.
  • Documentation usage is emphasized again; after running dash help, it becomes clear that agents can autonomously execute tasks based on their understanding of commands learned from help docs.

Defining Agent Operation Rules

  • A copy of successful CLI commands serves as a foundation for creating new operational rules within Cloud Code, focusing on understanding documentation before executing commands.
  • Specific operational preferences are established: always use interactive terminals without certain flags (like -p), defining fast and heavy model parameters clearly for future executions.
  • Trust in models leads to setting default behaviors such as skipping permission checks when necessary. This reflects confidence in automated processes while maintaining safety protocols through documentation reference.

Finalizing Documentation Integration

  • Future plans include integrating additional cookbooks into existing documentation frameworks, enhancing overall usability across different use cases while reinforcing learning through practical application.

Code-Based Structure and Progressive Disclosure

Introduction to the Cookbook Concept

  • The discussion introduces a "cookbook" approach, emphasizing code-based structures that serve as additional resources for users.
  • This method aims to enhance progressive disclosure abilities, providing clear guidance on when to use specific tools and codes.

Utilizing Claude Code

  • Users are encouraged to enter Claude code agents with enabled settings, referencing documentation for clarity.
  • Simple examples illustrate how to utilize Claude code effectively, such as using it in a terminal environment.

Establishing Patterns and Command Prompts

  • The speaker demonstrates the use of command prompts (e.g., classic command K prompting) within coding environments.
  • Emphasis is placed on the versatility of prompts and agents, highlighting their role in accessing computational resources efficiently.

Forking Terminal Instances

  • A new cloud code instance is created, showcasing a common pattern of starting fresh with an agent that has no prior context.
  • The process involves invoking skills conditionally based on documentation, illustrating progressive disclosure through conditional prompts.

Managing Directories and Committing Code

  • The speaker discusses ensuring forks open in the current working directory rather than defaulting to root directories.
  • Regular commits are emphasized as good practice for maintaining project integrity and enabling easy reversion if issues arise.

Contextualizing Agent Operations

  • Fresh context windows are recommended when working with multiple agents to maintain focus on specific tasks.
  • The importance of understanding tool functionality before execution is reiterated, ensuring effective operation within coding environments.

Troubleshooting and Enhancing Agentic Code

  • Issues related to capturing output from scripts are addressed; suggestions include improving error handling for better visibility into operations.
  • The discussion concludes with insights into simplifying complex string replacements while ensuring robust functionality in cloud code applications.

Agent Development and CLI Integration

Creating a New Agent for Codeex and Gemini

  • The speaker discusses the need to develop a skill that allows forking terminal windows to add specific information, aiming to replicate this functionality for Codeex and Gemini.
  • A prime command is introduced as useful for building prompts that help the agent understand how to operate within the codebase, specifically by reading documentation.
  • The agent is instructed to read the entire cookbook using direct syntax, ensuring it has comprehensive knowledge before proceeding with tasks.

Setting Up Models and Commands

  • The speaker emphasizes the importance of having equivalent versions of Codeex and Gemini like Claude's setup, specifying default models needed for operation.
  • Specific models are chosen for both Codeex (2.5 Flash) and Gemini (3 Pro Preview), highlighting the necessity of precise model selection during development.

Scaling Agent Capabilities

  • The discussion touches on scaling existing patterns with agents, noting that many details could have been planned in advance but are being resolved iteratively.
  • Different syntaxes between models are acknowledged, allowing flexibility in tweaking variables as needed while testing functionalities.

Testing Forking Functionality

  • The speaker initiates a new session using Codeex's fast model to summarize commands, demonstrating practical application of the developed skills.
  • An issue arises where the agent struggles with executing commands correctly; emphasis is placed on refining prompts rather than blaming model limitations.

Understanding Tool Limitations

  • It’s highlighted that often issues stem from user error or misunderstanding rather than flaws in models or tools themselves.
  • Permissions on files are adjusted to ensure smooth operation of agents; this step underscores the importance of proper setup in achieving desired outcomes.

How to Use Cloud Code for Forking Sessions

Overview of Cloud Code Functionality

  • The speaker discusses the use of cloud code, indicating that it is operational and providing feedback through return codes.
  • Cloud code has both strengths and weaknesses; it can summarize documents but may not always be effective in all scenarios. A specific document outlines how to set up a cloud code agent and execute commands.

Purpose of Forking Sessions

  • The tool was developed to enable forking sessions, allowing users to scale compute capabilities and impact effectively.
  • Forking involves creating summaries similar to the compact command, which resets context windows while maintaining ongoing tasks.

Implementing Summarization in Agents

  • The goal is to program agents to summarize completed work before passing this summary into another agent as part of a prompt template.
  • Clear communication between agents is emphasized; the base agent writes prompts directed at the fork agent.

Structuring User Prompts

  • A YAML format will be used for clarity in summarizing user prompts, including history and responses.
  • This structured approach allows the fork agent to understand previous conversations better, enhancing its ability to respond accurately.

Conditions for Forking with Summaries

  • Specific conditions must be established for when a user requests a fork terminal with a summary, ensuring clarity in communication.
  • The intelligence of the model plays a crucial role in generating accurate summaries that include prior conversation history.

Testing Forkable Conversations

  • The speaker prepares test prompts related to ffmpeg and other tools, setting up history for compression and summarization.
  • An example prompt is provided: "Understand this codebase. Then write a 20-line summary in the readme," demonstrating how features are enabled through summarized work done.

Creating a Skill from Scratch

Overview of Fork Activation and Codec CLI

  • The process involves using fork activation with codec CLI to efficiently manage tasks, selecting a model that summarizes the work done.
  • The current implementation updates a file directly, which is not desired; instructions need to clarify that the file should only be read for crafting new prompts.

Instructions for Agent Interaction

  • Emphasis on not updating files directly but rather reading them to create new prompts for the fork agent.
  • A summary of interactions is generated, showcasing user prompts and agent responses effectively, indicating successful context management.

Utilizing Cloud Code Features

  • Demonstration of Cloud Code's ability to rewind history allows reverting commands easily during development.
  • Successful execution of a new agent without overwriting previous files; highlights the importance of maintaining conversation history in prompt creation.

Enhancements and Improvements

  • The newly created agent can understand codebases and generate summaries; initial formatting may require adjustments.
  • Discussion on improving output formatting showcases iterative development processes in creating skills from scratch.

Key Takeaways on Skills Development

  • Skills are crucial as they integrate reusable code and prompts; focus should remain on core components: context, model, prompt, and tools.
  • Future plans include refining the codebase further while emphasizing mastering foundational elements for effective engineering practices.
Video description

If you can't build your OWN agent skills, you're leaving MASSIVE productivity gains on the table. Agent Skills are powerful tools to have in your AI Agentic Coding arsenal. Period. 🎥 Featured Links: - Fork Terminal Skill: https://github.com/disler/fork-repository-skill - Tactical Agentic Coding: https://agenticengineer.com/tactical-agentic-coding?y=X2ciJedw2vU - Agent Skills: https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview 🔥 In this raw, unfiltered AI coding devlog, we're building a complete agent skill from the ground up. No flashy demos, no hype - just pure agentic coding and prompt engineering in action. Watch as we create the Fork Terminal skill using Claude Code, demonstrating the exact process you need to master to build powerful, reusable agent skills. 🛠️ This video showcases agentic coding at its finest. We start with pen and paper planning (the secret weapon every engineer overlooks), then progressively build out a fully functional skill that lets you fork terminal sessions and spin up new agentic coding environments. See how proper planning and prompt engineering combine to create agent skills that scale your compute and multiply your impact. 💡 You'll learn the critical components of agent skill architecture: the pivot file (skill.md), the tools directory, the prompts directory, and the cookbook for progressive disclosure. This isn't just theory - we live-code the entire Fork Terminal skill, handling Mac and Windows support, integrating with Claude Code, Gemini CLI, and Codex CLI, and implementing conversation summarization for true context window forking. 🚀 IndyDevDan takes you through every step of the agentic devlog process, from initial concept to working proof of concept. Learn how to use Claude Code and Claude skills effectively, leverage Astral UV for Python tooling, and build agent skills that let you spawn parallel agents working on different problems simultaneously. This is in-loop agentic coding at its best. 🌟 Whether you're building with Claude Code, Gemini CLI, or Codex CLI, understanding agent skills and prompt engineering is non-negotiable in the age of AI. This AI devlog demonstrates the fundamental shift in how we build software - where prompts become the new fundamental unit of programming and agent skills become your force multipliers. 🔍 Key concepts covered: - Agent Skills: Build reusable, composable skills for your AI agents - Claude Code: Master in-loop agentic coding with Claude - Prompt Engineering: Write effective prompts and progressive disclosure patterns - Fork Terminal: Spawn parallel agent sessions for maximum productivity - Agentic Coding: Scale your compute to scale your impact - Devlog: Real, raw software development with AI coding tools - Claude Skills: Understand the architecture behind powerful agent skills 💻 This isn't your typical polished tutorial - this is a real AI coding devlog where you see the actual process, including the mistakes, iterations, and problem-solving. Learn how to think through problems before touching code, use planning notebooks effectively, and leverage Claude Code to build production-ready agent skills. Remember: The prompt is the fundamental unit of knowledge work in the generative AI age. Skills let you deploy prompts and code against any problem in a consistent, reusable way. Stay focused and keep building. 📖 Chapters 00:00 Let's Build a Skill from Scratch 02:13 Begin with the end in mind 09:17 Initialize Skill Codebase 26:34 Agent Files 41:28 Forked Summaries #devlog #claudecode #aicoding