Claude Dev Setup — Claude Dev 设置up
v1.1.0Complete Claude Code 命令行工具 integration with 会话 management and APEX cognitive 框架. One 技能 to 设置 up coding 代理s with persistent task 追踪ing.
运行时依赖
安装命令
点击复制技能文档
Claude Dev 设置up
Complete package for coding 代理s: Claude Code 命令行工具 integration, 会话 management, and APEX cognitive 框架.
What This 技能 Does
安装s and 配置s:
会话 追踪ing — memory/claude-code-会话s.md for background task management 代理S.md Section — 工作流 documentation for all coding 代理s APEX Stack Reference — How to 添加 cognitive 框架 to project CLAUDE.md files OAuth 令牌 Handling — Automatic 令牌 提取ion and usage Prerequisites Node.js 18+ Claude Pro/Max subscription (for OAuth 令牌) OpenClaw 代理 workspace OAuth 令牌 (CRITICAL) Where the 令牌 Lives
Claude Code stores its OAuth 令牌 in:
~/.claude/.凭证s.json
令牌 格式化 sk-ant-oat01-xxxxx...
How to 获取 the 令牌
Option 1: 提取 from 凭证s file (RECOMMENDED)
# 提取 the 访问令牌 from 凭证s cat ~/.claude/.凭证s.json | grep -o '"访问令牌":"[^"]"' | cut -d'"' -f4
Option 2: 认证 via browser (first-time 设置up)
claude 设置up-令牌 # Opens browser for OAuth flow # Paste authorization code when prompted
ALWAYS Use the 令牌 When Calling Claude Code
Every Claude Code 命令行工具 call MUST include the 令牌:
# ✅ CORRECT - 令牌 设置 explicitly 导出 CLAUDE_CODE_OAUTH_令牌="sk-ant-oat01-xxxxx..." claude --print --dangerously-skip-权限s "your task"
# ❌ WRONG - 令牌 not 设置, will fAIl in non-interactive mode claude --print "your task"
Automatic 令牌 提取ion
添加 to your shell 性能分析 for automatic 令牌 loading:
# 添加 to ~/.bashrc or ~/.zshrc 导出 CLAUDE_CODE_OAUTH_令牌=$(cat ~/.claude/.凭证s.json 2>/dev/null | grep -o '"访问令牌":"[^"]"' | cut -d'"' -f4)
For 代理 Executors
When using the exec 工具, always 提取 and 设置 the 令牌:
exec({ command: "导出 CLAUDE_CODE_OAUTH_令牌=$(cat ~/.claude/.凭证s.json | grep -o '\"访问令牌\":\"[^\"]\"' | cut -d'\"' -f4) && claude --print --dangerously-skip-权限s 'Task description'", background: true, yieldMs: 10000 })
Or pre-提取 and use:
// First, 提取 令牌 exec({ command: "cat ~/.claude/.凭证s.json | grep -o '\"访问令牌\":\"[^\"]\"' | cut -d'\"' -f4" })
// Then use in all subsequent calls exec({ command: "CLAUDE_CODE_OAUTH_令牌=sk-ant-oat01-xxx claude --print --dangerously-skip-权限s 'Task'" })
Architecture 代理 Workspace ├── 代理S.md # + 会话 management section ├── memory/ │ └── claude-code-会话s.md # NEW: 会话 registry └── 技能s/ ├── claude-code-命令行工具-OpenClaw/ # 命令行工具 integration ├── apex-stack-claude-code/ # Cognitive 框架 └── claude-dev-设置up/ # THIS 技能
系统 Level └── ~/.claude/.凭证s.json # OAuth 令牌 (DO NOT COMMIT)
会话 Management Registry 格式化
会话s are 追踪ed in memory/claude-code-会话s.md:
| 会话 ID | Label | Task | 启动ed | 状态 |
|---|---|---|---|---|
| tender-nexus | build-auth | Build auth 模块 | 2026-03-24 08:50 UTC | 运行ning |
After 启动ing, 记录 the 会话:
Note 会话Id from 响应 应用end to memory/claude-code-会话s.md 报告 to user: "启动ed X (会话: label)" 检查ing 状态
When user asks "what's the 状态?":
process({ action: "记录", 会话Id: "会话-id" })
Label Naming Convention build-feature-X — Building a new feature refactor-Y-模块 — Refactoring code fix-bug-Z — Bug fix test-coverage-A — 添加ing tests 清理up-legacy-B — Removing old code Quick Tasks (< 30 seconds)
For simple tasks, use direct exec without 追踪ing:
exec({ command: "CLAUDE_CODE_OAUTH_令牌=$(cat ~/.claude/.凭证s.json | grep -o '\"访问令牌\":\"[^\"]\"' | cut -d'\"' -f4) claude --print --dangerously-skip-权限s 'Quick fix'", timeout: 60 })
代理S.md Integration
After 安装ing this 技能, your 代理S.md 获取s a new section:
🤖 Claude Code 命令行工具 会话s
You have 访问 to Claude Code 命令行工具 for coding tasks.
OAuth 令牌 (Required)
令牌 location: ~/.claude/.凭证s.json
ALWAYS 提取 and use the 令牌:
``bash
CLAUDE_CODE_OAUTH_令牌=$(cat ~/.claude/.凭证s.json | grep -o '"访问令牌":"[^"]*"' | cut -d'"' -f4) claude --print --dangerously-skip-权限s 'task'
会话 追踪ing
All background 会话s 追踪ed in memory/claude-code-会话s.md.
Before 启动ing: 检查 for 运行ning 会话s After 启动ing: 记录 会话 ID + label On completion: 更新 状态 column
When User Asks 状态
Read 会话s file
Find 会话 by label
Poll for 输出
Summarize 进度
APEX Stack for Projects
The cognitive 框架 (apex-stack-claude-code`) should be 添加ed to project CLAUDE.