Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

amp-api-awareness

БесплатноБез исполняемых скриптовНе проверен

Extract hidden Amp API patterns from local thread data via DuckDB analysis

plurigridот plurigrid★ 73 звезды на GitHub

Об этом скилле

Amp API Awareness

Discover Amp's undocumented API by mining local thread storage.

Data Sources

Source Path Format
Threads ~/.local/share/amp/threads/*.json JSON per thread
History ~/.claude/history.jsonl JSONL sessions
Projects ~/.claude/projects/*/*.jsonl JSONL per project

Quick Extraction

Count all threads

ls ~/.local/share/amp/threads/*.json | wc -l

Sample thread structure

cat ~/.local/share/amp/threads/T-*.json | head -1 | jq 'keys'
# Expected: ["id", "title", "created", "updatedAt", "messages", ...]

DuckDB unified query

-- Load all threads
CREATE TABLE amp_threads AS
SELECT * FROM read_json('~/.local/share/amp/threads/*.json', 
  columns={id: 'VARCHAR', title: 'VARCHAR', created: 'BIGINT', 
           messages: 'JSON[]', creatorUserID: 'VARCHAR'},
  ignore_errors=true);

-- Extract message patterns
SELECT 
  id,
  title,
  len(messages) as msg_count,
  abs(hash(id)) % 3 - 1 as trit
FROM amp_threads
ORDER BY created DESC
LIMIT 20;

API Discovery Patterns

1. Tool Usage Extraction

-- Find all tool invocations across threads
SELECT 
  json_extract_string(msg, '$.type') as msg_type,
  json_extract_string(msg, '$.name') as tool_name,
  count(*) as usage_count
FROM amp_threads, unnest(messages) as t(msg)
WHERE json_extract_string(msg, '$.type') = 'tool_use'
GROUP BY 1, 2
ORDER BY usage_count DESC;

2. MCP Server Detection

-- Extract MCP patterns from content
SELECT DISTINCT
  regexp_extract(content, 'mcp__([a-z_]+)__', 1) as mcp_server
FROM (
  SELECT json_extract_string(msg, '$.content') as content
  FROM amp_threads, unnest(messages) as t(msg)
)
WHERE mcp_server IS NOT NULL;

3. Thread Schema Discovery

// TypeScript extraction from thread JSON
interface AmpThread {
  id: string;           // T-{uuid}
  title: string;
  created: number;      // Unix timestamp ms
  updatedAt: string;    // ISO8601
  creatorUserID: string;
  messages: AmpMessage[];
}

interface AmpMessage {
  role: 'user' | 'assistant';
  content: ContentBlock[];
}

type ContentBlock = 
  | { type: 'text'; text: string }
  | { type: 'thinking'; thinking: string }
  | { type: 'tool_use'; id: string; name: string; input: unknown }
  | { type: 'tool_result'; tool_use_id: string; content: string };

Full Statistics (2,424 threads, 118,951 messages)

Core Tools

Tool Invocations Purpose
Bash 30,786 Shell commands
Read 10,373 File reading
edit_file 6,884 File modification
create_file 5,373 File creation
todo_write 3,862 Task management
Grep 2,837 Pattern search
skill 1,798 Skill loading
Task 1,314 Sub-agent dispatch
glob 1,121 File patterns
mermaid 1,014 Diagrams
find_thread 892 Thread search
read_thread 834 Thread content

MCP Servers

Server Invocations Top Function
firecrawl 1,715 firecrawl_scrape (1,039)
exa 1,323 web_search_exa (1,150)
gay 1,284 palette (206), next_color (151)
deepwiki 405 ask_question (241)
beeper 253 list_messages (89)
radare2 135 Binary analysis
huggingface 130 ML model access
tree_sitter ~100 AST queries

Agent Modes

  • smart: 2,398 threads (99%)
  • rush: 1 thread
  • nil: 25 threads

Known Endpoints & APIs

Endpoint/Command Access Notes
ampcode.com/threads/T-* Public URL Thread viewer
ampcode.com/settings Auth required API key, account management
find_thread tool Agent API Query by DSL, returns creatorUserID
read_thread tool Agent API Extract thread content by goal

CLI Commands

Command Purpose
amp threads list Lists threads with ID, title, visibility, messages
amp threads share --visibility <v> Set: private, public, unlisted, workspace, group
amp threads share --support Share with Amp support for debugging
amp login / amp logout Auth management
amp skill list/add/remove Skill management
amp mcp list/add/remove MCP server configuration

Visibility Levels

Level Description
private Only creator can see
workspace All workspace members can see
group Specific group access
public Anyone with link
unlisted Anyone with link (not indexed)

User ID Format

From find_thread API:

creatorUserID: "user_01JZZT0P50CFR9XKKW8SXQ7J74"
  • Prefix: user_
  • Body: 26-char ULID-like identifier (TypeID format)

Workspace Member Discovery

Query workspace threads to find all creatorUserID values:

# Via find_thread DSL (repo: filter scopes to workspace)
find_thread "repo:i after:30d"

Exa

Полный SKILL.md на GitHub

Установить amp-api-awareness в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

amp-cost-monitor.cljamp-threads-export.jsonlextract-amp-api.clj

FAQ

Что делает скилл amp-api-awareness?

Extract hidden Amp API patterns from local thread data via DuckDB analysis

Как установить скилл amp-api-awareness?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл amp-api-awareness запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить amp-api-awareness с