add-agent

A workflow for adding an AI command-line tool to the askCode.nvim Neovim plugin. It covers the adapter code, registry entry, documentation, and MiniTest tests needed for a new agent.

In plain words
What is it for?
Use it when connecting a new non-interactive CLI agent, choosing how to pass prompts, parsing its output, registering it, and testing its behavior.
Why use it?
It provides a complete integration checklist for tools with different command formats and output styles. This helps prevent incorrect parsing, prompt handling, or missing registration and tests.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/realebi/askcode/add-agent
Any agent
npx skills add realEbi/askCode --skill add-agent
Clone the repo
git clone --depth 1 https://github.com/realEbi/askCode

Made for: Claude Code, Codex.

Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 646 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00064 $0.00646
Opus 5 $0.00032 $0.00323
Sonnet 5 $0.00013 $0.00129
Haiku 4.5 $0.00006 $0.00065

Measured yesterday against content hash e917ebb20523, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-agent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/add-agent/SKILL.md · 53 lines

How it starts

The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Task: Add a New Agent to askCode.nvim

You are implementing a new agent named $agent_name whose CLI is invoked as:

$cli_invocation

Follow the implementation plan in .agents/add-new-agent.md exactly. The relevant source files are:

  • lua/askCode/agents/ — existing agents to use as reference
  • lua/askCode/agents/init.lua — agent registry (must be updated)
  • .agents/summary/interfaces.md — config schema docs (must be updated)
  • tests/ — existing test files to use as reference

Current agent registry

cat lua/askCode/agents/init.lua

Execution steps

Work through these steps in order. Do not skip any.

Step 1 — Analyse the CLI output format. Determine whether $cli_invocation produces plain text, a single JSON object, or a JSON event stream. Use that to select the correct parse_response strategy from the plan.

Step 2 — Determine the prompt input method. If the CLI reads the prompt from a flag argument (e.g. -p "...") or if prompts can contain code with newlines, use the tempfile method. If the CLI reads from stdin, use the shellescape+pipe method.

Step 3 — Create lua/askCode/agents/$agent_name.lua. Implement all four exports: setup, prepare_command, parse_response, ask. Use the chosen strategies from Steps 1 and 2.

Step 4 — Register the agent. Add $agent_name = require("askCode.agents.$agent_name") to the M.agents table in lua/askCode/agents/init.lua.

Step 5 — Update documentation. In .agents/summary/interfaces.md, append | "$agent_name" to the agent config comment line.

Step 6 — Write unit tests. Create tests/test_$agent_name_agent.lua with all four test groups: setup, prepare_command, parse_response, ask. Mock io.popen in all ask tests. The mock output for the success case must be a string that the real CLI would produce, and the expected parsed value must match what parse_response returns for that input.

Step 7 — Verify. Run make test and confirm the output shows Fails (0) and all cases for test_$agent_name_agent.lua are green. If any test fails, fix the implementation before finishing.

Read the full file on GitHub · 53 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 53 lines · 64 tokens per session scan A e917ebb20523

Subscribe to this mod's changes

add-agent is a skill published in the GitHub repository realEbi/askCode (4 stars, last pushed 4mo ago), licensed MIT. It adds 64 tokens to every session and 646 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

skillgrade-graders

Authors deterministic and LLM rubric graders for skillgrade evaluations. Use when creating scoring scripts, writing evaluation rubrics, or combining multiple graders with weighted scoring. Don't use for setting up eval pipelines, configuring eval.yaml defaults, or general test writing.

mgechev/skillgrade · 54 tokens

angular-modern-apis

Guidelines for using modern Angular APIs (signals, inject, control flow).

mgechev/skillgrade · 20 tokens

superlint

This skill describes the mandatory standard operating procedure for using our internal SuperLint tool. Use this when tasks require fixing code quality issues according to corporate standards.

mgechev/skillgrade · 0 tokens

skillgrade-setup

Sets up and runs skillgrade evaluation pipelines for Agent Skills. Use when initializing eval configurations, running trials, reviewing results, or integrating with CI. Don't use for writing grader scripts, general test authoring, or non-agentic documentation.

mgechev/skillgrade · 52 tokens

ship-it

End-to-end ship loop: atomic commits, PR, tiered review (lite|heavy), fix every finding, re-review until zero remain, then merge-commit. lite runs a single /review pass; heavy spins up a dynamic Workflow with diff-aware review personas plus a Codex cross-model peer. Use when Stevie says "/ship-it", "ship it", "ship…

stevengonsalvez/agents-in-a-box · 96 tokens

tui-screen

Create TUI screens, components, and views for the agents-in-a-box terminal UI. Use when building new ratatui components, adding panels, creating list views, or styling any terminal interface element. Provides color palette, component patterns, and quality checklist.

stevengonsalvez/agents-in-a-box · 56 tokens