Reorganize: Move all skills to skills/ folder
- Created skills/ directory - Moved 272 skills to skills/ subfolder - Kept agents/ at root level - Kept installation scripts and docs at root level Repository structure: - skills/ - All 272 skills from skills.sh - agents/ - Agent definitions - *.sh, *.ps1 - Installation scripts - README.md, etc. - Documentation Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
9
skills/plugins/cache/zai-coding-plugins/glm-plan-bug/0.0.1/.claude-plugin/plugin.json
vendored
Normal file
9
skills/plugins/cache/zai-coding-plugins/glm-plan-bug/0.0.1/.claude-plugin/plugin.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"name": "glm-plan-bug",
|
||||
"description": "Submit case feedback and bug reports for GLM Coding Plan service",
|
||||
"version": "0.0.1",
|
||||
"author": {
|
||||
"name": "gongchao",
|
||||
"email": "chao.gong@z.ai"
|
||||
}
|
||||
}
|
||||
29
skills/plugins/cache/zai-coding-plugins/glm-plan-bug/0.0.1/README.md
vendored
Normal file
29
skills/plugins/cache/zai-coding-plugins/glm-plan-bug/0.0.1/README.md
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
# GLM Plan Bug Plugin
|
||||
|
||||
Submit case feedback and bug reports for GLM Coding Plan.
|
||||
|
||||
Attention:
|
||||
|
||||
- This plugin is designed to work specifically with the GLM Coding Plan in Claude Code.
|
||||
- This plugin requires Node.js to be installed in your environment.
|
||||
|
||||
## How to use
|
||||
|
||||
In Claude Code, run:
|
||||
```
|
||||
/glm-plan-bug:case-feedback i have a issue with my plan
|
||||
```
|
||||
|
||||
## Command overview
|
||||
|
||||
### /case-feedback
|
||||
|
||||
Submit case feedback to report issues or suggestions for the current conversation.
|
||||
|
||||
**Execution flow:**
|
||||
1. Command `/case-feedback` triggers `@case-feedback-agent`
|
||||
2. The agent invokes `@case-feedback-skill`
|
||||
3. The skill gathers feedback information and executes the submission script
|
||||
4. The skill returns either the successful response or the failure reason
|
||||
|
||||
**Important constraint:** Run the submission exactly once and return immediately whether it succeeds or fails.
|
||||
37
skills/plugins/cache/zai-coding-plugins/glm-plan-bug/0.0.1/agents/case-feedback-agent.md
vendored
Normal file
37
skills/plugins/cache/zai-coding-plugins/glm-plan-bug/0.0.1/agents/case-feedback-agent.md
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: case-feedback-agent
|
||||
description: Submit case feedback to report issues or suggestions. Triggered by the /glm-plan-bug:case-feedback command.
|
||||
tools: Bash, Read, Skill, Glob, Grep
|
||||
---
|
||||
|
||||
# Case Feedback Agent
|
||||
|
||||
You are responsible for submitting user feedback about the current case/conversation.
|
||||
|
||||
## Critical constraint
|
||||
|
||||
**Run the submission exactly once.** Regardless of success or failure, execute a single submission and immediately return the result. No retries, no loops.
|
||||
|
||||
## Execution
|
||||
|
||||
### Invoke the skill
|
||||
|
||||
Call @glm-plan-bug:case-feedback-skill to feedback.
|
||||
|
||||
The skill will run submit-feedback.mjs automatically, then return the result.
|
||||
|
||||
### Report the outcome
|
||||
|
||||
Based on the skill output, respond to the user:
|
||||
|
||||
Attention: If the Platform in the skill output is ZHIPU, then output Chinese 中文. If it is ZAI, then output English.
|
||||
|
||||
- **Success**: Confirm that feedback has been submitted successfully
|
||||
- **Failure**: Show the error details
|
||||
|
||||
## Prohibited actions
|
||||
|
||||
- Do not run multiple submissions
|
||||
- Do not retry automatically after failure
|
||||
- Do not ask the user whether to retry
|
||||
- Do not modify user files
|
||||
16
skills/plugins/cache/zai-coding-plugins/glm-plan-bug/0.0.1/commands/case-feedback.md
vendored
Normal file
16
skills/plugins/cache/zai-coding-plugins/glm-plan-bug/0.0.1/commands/case-feedback.md
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
allowed-tools: all
|
||||
description: Submit case feedback to report issues or suggestions for the current conversation
|
||||
---
|
||||
|
||||
# Case Feedback
|
||||
|
||||
Invoke @glm-plan-bug:case-feedback-agent to submit feedback for the current case/conversation.
|
||||
|
||||
## Critical constraint
|
||||
|
||||
**Run the submission exactly once** — regardless of success or failure, execute a single submission and return the result immediately.
|
||||
|
||||
## Usage
|
||||
|
||||
The user may provide feedback content directly, or you can help summarize the issue. The context will be automatically extracted from the current conversation.
|
||||
63
skills/plugins/cache/zai-coding-plugins/glm-plan-bug/0.0.1/skills/case-feedback-skill/SKILL.md
vendored
Normal file
63
skills/plugins/cache/zai-coding-plugins/glm-plan-bug/0.0.1/skills/case-feedback-skill/SKILL.md
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
name: case-feedback-skill
|
||||
description: Run the case feedback script to submit feedback for the current conversation. Only use when invoked by case-feedback-agent.
|
||||
allowed-tools: Bash, Read
|
||||
---
|
||||
|
||||
# Case Feedback Skill
|
||||
|
||||
Execute the feedback submission script and return the result.
|
||||
|
||||
## Critical constraint
|
||||
|
||||
**Run the script exactly once** — regardless of success or failure, execute it once and return the outcome.
|
||||
|
||||
## Execution
|
||||
|
||||
### Gather information
|
||||
|
||||
**feedback**:
|
||||
|
||||
- If the user explicitly provided feedback text, use that directly
|
||||
- If the user describes a problem or issue, summarize it concisely as the feedback
|
||||
- Ask the user for clarification only if no feedback intent can be inferred
|
||||
|
||||
**context**:
|
||||
|
||||
The context contains a summary of the conversation, and **must append** the original, complete conversation history data.
|
||||
|
||||
Summarize the current conversation context, including:
|
||||
- What task the user was trying to accomplish
|
||||
- What operations were performed
|
||||
- Any errors or unexpected behaviors encountered
|
||||
- Relevant code snippets or file paths (keep it concise)
|
||||
|
||||
**code_type**:
|
||||
|
||||
Identify the programming language or code type involved (e.g., JavaScript, Python, Java). If not relevant, leave it blank.
|
||||
|
||||
**request_id**:
|
||||
|
||||
Extract the unique request ID or the session ID associated with this conversation or case. If not available, leave it blank.
|
||||
|
||||
**happened_time**:
|
||||
|
||||
Extract the timestamp when the issue occurred. If not mentioned, leave it blank.
|
||||
|
||||
|
||||
### Run the submission
|
||||
|
||||
Use Node.js to execute the bundled script, pay attention to the path changes in the Windows:
|
||||
|
||||
```bash
|
||||
node scripts/submit-feedback.mjs --feedback "user feedback content" --context "conversation context summary" --code_type "the current code type, eg: javascript, typescript, python, java, etc. Not required." --happened_time "the time when the issue happened, eg: 2025-12-10 11:15:00. Not required." --request_id "the unique request id if available. Not required."
|
||||
```
|
||||
|
||||
> If your working directory is elsewhere, `cd` into the plugin root first or use an absolute path:
|
||||
> `node /absolute/path/to/glm-plan-bug/skills/case-feedback-skill/scripts/submit-feedback.mjs --feedback "..." --context "..."`
|
||||
|
||||
### Return the result
|
||||
|
||||
After execution, return the result to the caller:
|
||||
- **Success**: display the submission confirmation
|
||||
- **Failure**: show the error details and likely cause
|
||||
@@ -0,0 +1,176 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Case feedback submission script.
|
||||
* Determines whether to call the Z.ai or ZHIPU endpoint based on ANTHROPIC_BASE_URL
|
||||
* and authenticates with ANTHROPIC_AUTH_TOKEN.
|
||||
*/
|
||||
|
||||
import https from 'https';
|
||||
|
||||
// Parse command line arguments
|
||||
const args = process.argv.slice(2);
|
||||
let feedback = '';
|
||||
let context = '';
|
||||
let codeType = '';
|
||||
let happenedTime = '';
|
||||
let requestId = '';
|
||||
|
||||
for (let i = 0; i < args.length; i++) {
|
||||
if (args[i] === '--feedback' && args[i + 1]) {
|
||||
feedback = args[i + 1];
|
||||
i++;
|
||||
} else if (args[i] === '--context' && args[i + 1]) {
|
||||
context = args[i + 1];
|
||||
i++;
|
||||
} else if (args[i] === '--code_type' && args[i + 1]) {
|
||||
codeType = args[i + 1];
|
||||
i++;
|
||||
} else if (args[i] === '--happened_time' && args[i + 1]) {
|
||||
happenedTime = args[i + 1];
|
||||
i++;
|
||||
} else if (args[i] === '--request_id' && args[i + 1]) {
|
||||
requestId = args[i + 1];
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
if (!feedback) {
|
||||
console.error('Error: --feedback argument is required');
|
||||
console.error('');
|
||||
console.error('Usage:');
|
||||
console.error(' node submit-feedback.mjs --feedback "your feedback" --context "context info"');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (!context) {
|
||||
console.error('Error: --context argument is required');
|
||||
console.error('');
|
||||
console.error('Usage:');
|
||||
console.error(' node submit-feedback.mjs --feedback "your feedback" --context "context info"');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Read environment variables
|
||||
const baseUrl = process.env.ANTHROPIC_BASE_URL || '';
|
||||
const authToken = process.env.ANTHROPIC_AUTH_TOKEN || '';
|
||||
|
||||
if (!authToken) {
|
||||
console.error('Error: ANTHROPIC_AUTH_TOKEN is not set');
|
||||
console.error('');
|
||||
console.error('Set the environment variable and retry:');
|
||||
console.error(' export ANTHROPIC_AUTH_TOKEN="your-token-here"');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Validate ANTHROPIC_BASE_URL
|
||||
if (!baseUrl) {
|
||||
console.error('Error: ANTHROPIC_BASE_URL is not set');
|
||||
console.error('');
|
||||
console.error('Set the environment variable and retry:');
|
||||
console.error(' export ANTHROPIC_BASE_URL="https://api.z.ai/api/anthropic"');
|
||||
console.error(' or');
|
||||
console.error(' export ANTHROPIC_BASE_URL="https://open.bigmodel.cn/api/anthropic"');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Determine which platform to use
|
||||
let platform;
|
||||
let feedbackUrl;
|
||||
|
||||
// Extract the base domain from ANTHROPIC_BASE_URL
|
||||
const parsedBaseUrl = new URL(baseUrl);
|
||||
const baseDomain = `${parsedBaseUrl.protocol}//${parsedBaseUrl.host}`;
|
||||
|
||||
if (baseUrl.includes('api.z.ai')) {
|
||||
platform = 'ZAI';
|
||||
feedbackUrl = `${baseDomain}/api/monitor/feedback/case`;
|
||||
} else if (baseUrl.includes('open.bigmodel.cn') || baseUrl.includes('dev.bigmodel.cn')) {
|
||||
platform = 'ZHIPU';
|
||||
feedbackUrl = `${baseDomain}/api/monitor/feedback/case`;
|
||||
} else {
|
||||
console.error('Error: Unrecognized ANTHROPIC_BASE_URL:', baseUrl);
|
||||
console.error('');
|
||||
console.error('Supported values:');
|
||||
console.error(' - https://api.z.ai/api/anthropic');
|
||||
console.error(' - https://open.bigmodel.cn/api/anthropic');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(`Platform: ${platform}`);
|
||||
console.log('');
|
||||
|
||||
const submitFeedback = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const parsedUrl = new URL(feedbackUrl);
|
||||
const postData = JSON.stringify({
|
||||
feedback: feedback,
|
||||
context: context,
|
||||
codeType: codeType,
|
||||
happenedTime: happenedTime,
|
||||
requestId: requestId
|
||||
});
|
||||
|
||||
const options = {
|
||||
hostname: parsedUrl.hostname,
|
||||
port: 443,
|
||||
path: parsedUrl.pathname,
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Authorization': authToken,
|
||||
'Content-Type': 'application/json',
|
||||
'Accept-Language': 'en-US,en',
|
||||
'Content-Length': Buffer.byteLength(postData)
|
||||
}
|
||||
};
|
||||
|
||||
const req = https.request(options, (res) => {
|
||||
let data = '';
|
||||
|
||||
res.on('data', (chunk) => {
|
||||
data += chunk;
|
||||
});
|
||||
|
||||
res.on('end', () => {
|
||||
if (res.statusCode !== 200) {
|
||||
return reject(new Error(`HTTP ${res.statusCode}\n${data}`));
|
||||
}
|
||||
|
||||
console.log('Feedback submitted successfully!');
|
||||
console.log('');
|
||||
|
||||
try {
|
||||
const json = JSON.parse(data);
|
||||
console.log('Response:');
|
||||
console.log(JSON.stringify(json, null, 2));
|
||||
} catch (e) {
|
||||
console.log('Response body:');
|
||||
console.log(data);
|
||||
}
|
||||
|
||||
console.log('');
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
|
||||
req.on('error', (error) => {
|
||||
reject(error);
|
||||
});
|
||||
|
||||
req.write(postData);
|
||||
req.end();
|
||||
});
|
||||
};
|
||||
|
||||
const run = async () => {
|
||||
console.log('Submitting feedback...');
|
||||
console.log('Feedback:', feedback);
|
||||
console.log('Context:', context.substring(0, 200) + (context.length > 200 ? '...' : ''));
|
||||
console.log('');
|
||||
await submitFeedback();
|
||||
};
|
||||
|
||||
run().catch((error) => {
|
||||
console.error('Request failed:', error.message);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user