/install codemend
Codemend AI Skill
Codemend captures production JavaScript/TypeScript errors, analyzes them with AI, and generates fixes — either as GitHub PRs or paste-back prompts for AI coding tools like Lovable, Replit, and Cursor.
Tools
report_error
Report a production error to Codemend. The error will be analyzed by AI within seconds.
curl -X POST "https://codemend.ai/api/errors/ingest" \
-H "Content-Type: application/json" \
-d '{
"key": "'$CODEMEND_API_KEY'",
"message": "TypeError: Cannot read properties of undefined (reading '\''map'\'')",
"stack": "TypeError: Cannot read properties of undefined\
at renderList (src/components/List.tsx:15:23)",
"source_url": "https://myapp.com/dashboard",
"source_type": "openclaw"
}'
Response:
{ "status": "queued", "error_id": "uuid-here" }
get_fix
Get the AI-generated fix for a reported error. Includes explanation, root cause, confidence score, and a fix prompt you can paste into your AI coding tool.
curl -s "https://codemend.ai/api/errors/{ERROR_ID}/fix" \
-H "x-api-key: $CODEMEND_API_KEY"
Response:
{
"error": {
"id": "uuid",
"status": "analyzed",
"message": "TypeError: Cannot read properties of undefined",
"stack_trace": "...",
"source_url": "https://myapp.com/dashboard"
},
"fix": {
"id": "uuid",
"explanation": "The map() call fails because data is undefined on first render",
"root_cause": "Missing null check before array operation",
"confidence": 0.92,
"fix_prompt": "In src/components/List.tsx, add an early return if data is undefined...",
"pr_url": "https://github.com/user/repo/pull/42"
},
"dashboard_url": "https://codemend.ai/errors/uuid"
}
If the error is still being analyzed, the fix field will be null. Poll with check_status first.
check_status
Check if an error has been analyzed yet.
curl -s "https://codemend.ai/api/errors/{ERROR_ID}/status" \
-H "x-api-key: $CODEMEND_API_KEY"
Response:
{
"status": "analyzed",
"message": "TypeError: Cannot read properties of undefined",
"has_fix": true,
"fix_id": "uuid-here",
"dashboard_url": "https://codemend.ai/dashboard/errors/uuid"
}
Statuses: new → analyzing → analyzed / fix_applied / ignored
list_errors
List recent errors for this project.
curl -s "https://codemend.ai/api/errors?limit=10&status=analyzed" \
-H "x-api-key: $CODEMEND_API_KEY"
Response:
{
"errors": [
{
"id": "uuid",
"status": "analyzed",
"message": "TypeError: Cannot read properties of undefined",
"source_type": "openclaw",
"has_fix": true,
"fix_id": "uuid",
"created_at": "2026-03-11T12:00:00Z"
}
],
"total": 42
}
Setup in a Project
Browser (React, Next.js, Vue, etc.)
Add to your HTML \x3Chead>:
\x3Cscript src="https://codemend.ai/s.js" data-key="YOUR_API_KEY">\x3C/script>
Or if using an AI coding tool (Lovable, Replit, Bolt, etc.), paste this prompt:
Add this error monitoring script to my app. Put it in the
\x3Chead>section of index.html:\x3Cscript src="https://codemend.ai/s.js" data-key="YOUR_API_KEY">\x3C/script>
Node.js / Backend
npm install codemend
const codemend = require('codemend');
codemend.init({ apiKey: process.env.CODEMEND_API_KEY });
codemend.setupProcessHandlers();
Express
const codemend = require('codemend');
codemend.init({ apiKey: process.env.CODEMEND_API_KEY });
app.use(codemend.expressErrorHandler());
React Native
import codemend from 'codemend/react-native';
codemend.init({ apiKey: 'YOUR_API_KEY' });
codemend.setupErrorHandler();
Typical Workflow
- Set up error monitoring in your project (above)
- Errors are automatically captured and sent to Codemend
- Use
list_errorsto see recent errors - Use
get_fixto get the AI-generated fix - Apply the fix: paste the
fix_promptinto your AI tool, or review the PR on GitHub
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install codemend - 安装完成后,直接呼叫该 Skill 的名称或使用
/codemend触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Codemend 是什么?
Monitor, report, and get AI-generated fixes for JavaScript and TypeScript production errors with automated analysis and pull request integration. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 90 次。
如何安装 Codemend?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install codemend」即可一键安装,无需额外配置。
Codemend 是免费的吗?
是的,Codemend 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Codemend 支持哪些平台?
Codemend 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Codemend?
由 hankmint(@hankmint)开发并维护,当前版本 v1.1.0。