Claude-skill-registry linkai-agent
Call LinkAI applications and workflows. Use bash command to execute like 'bash <base_dir>/scripts/call.sh <app_code> <question>'.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/linkai-agent" ~/.claude/skills/majiayu000-claude-skill-registry-linkai-agent && rm -rf "$T"
manifest:
skills/data/linkai-agent/SKILL.mdsource content
LinkAI Agent Caller
Call LinkAI applications and workflows through API. Supports multiple apps/workflows configured in config.json.
The available apps are dynamically loaded from
config.json at skill loading time.
Setup
This skill requires a LinkAI API key. If not configured:
- Get your API key from https://link-ai.tech/console/api-keys
- Set the key using:
env_config(action="set", key="LINKAI_API_KEY", value="your-key")
Configuration
- Copy
toconfig.json.templateconfig.json - Configure your apps/workflows:
{ "apps": [ { "app_code": "your_app_code", "app_name": "App Name", "app_description": "What this app does" } ] }
- The skill description will be automatically updated when the agent loads this skill
Usage
Important: Scripts are located relative to this skill's base directory.
When you see this skill in
<available_skills>, note the <base_dir> path.
CRITICAL: Always use
bash command to execute the script:
# General pattern (MUST start with bash): bash "<base_dir>/scripts/call.sh" "<app_code>" "<question>" [model] [stream] [timeout] # DO NOT execute the script directly like this (WRONG): # "<base_dir>/scripts/call.sh" ... # Parameters: # - app_code: LinkAI app or workflow code (required) # - question: User question (required) # - model: Override model (optional, uses app default if not specified) # - stream: Enable streaming (true/false, default: false) # - timeout: curl timeout in seconds (default: 120, recommended for video/image generation)
IMPORTANT - Timeout Configuration:
- The script has a default timeout of 120 seconds (suitable for most cases)
- For complex tasks (video generation, large workflows), pass a longer timeout as the 5th parameter
- The bash tool also needs sufficient timeout - set its
parameter accordinglytimeout - Example:
bash(command="bash <script> <app_code> <question> '' 'false' 180", timeout=200)
Examples
Call an app (uses default 60s timeout)
bash(command='bash "<base_dir>/scripts/call.sh" "G7z6vKwp" "What is AI?"', timeout=60)
Call an app with specific model
bash(command='bash "<base_dir>/scripts/call.sh" "G7z6vKwp" "Explain machine learning" "LinkAI-4.1"', timeout=60)
Call a workflow with custom timeout (video generation)
# Pass timeout as 5th parameter to script, and set bash timeout slightly longer bash(command='bash "<base_dir>/scripts/call.sh" "workflow_code" "Generate a sunset video" "" "false" "180"', timeout=180)
bash "<base_dir>/scripts/call.sh" "workflow_code" "Analyze this data: ..."
Supported Models
You can specify any LinkAI supported model:
- Latest GPT-4.1 model (1000K context)LinkAI-4.1
- GPT-4.1 mini (1000K context)LinkAI-4.1-mini
- GPT-4o model (128K context)LinkAI-4o
- GPT-4o mini (128K context)LinkAI-4o-mini
- DeepSeek-V3 (64K context)deepseek-chat
- DeepSeek-R1 reasoning modeldeepseek-reasoner
- Claude 4 Sonnet (200K context)claude-4-sonnet
- Gemini 2.5 Pro (1000K context)gemini-2.5-pro- And many more...
Full model list: https://link-ai.tech/console/models
Response Format
Success response:
{ "app_code": "G7z6vKwp", "content": "AI stands for Artificial Intelligence...", "usage": { "prompt_tokens": 10, "completion_tokens": 50, "total_tokens": 60 } }
Error response:
{ "error": "Error description", "message": "Detailed error message" }
Features
- ✅ Multiple Apps: Configure and call multiple LinkAI apps/workflows
- ✅ Dynamic Loading: Apps are loaded from config.json at runtime
- ✅ Model Override: Optionally specify model per request
- ✅ Streaming Support: Enable streaming output
- ✅ Knowledge Base: Apps can use configured knowledge bases
- ✅ Plugins: Apps can use enabled plugins (image recognition, web search, etc.)
- ✅ Workflows: Execute complex multi-step workflows
Notes
- Each app/workflow maintains its own configuration (prompt, model, temperature, etc.)
- Apps can have knowledge bases attached for domain-specific Q&A
- Workflows execute from start node to end node and return final output
- Token usage and costs depend on the model used
- See LinkAI documentation for pricing: https://link-ai.tech/console/funds
- The skill description is automatically generated from config.json when loaded
Troubleshooting
"LINKAI_API_KEY environment variable is not set"
- Use env_config tool to set the API key
"app_code is required"
- Make sure you're passing the app_code as the first parameter
"应用不存在" (App not found)
- Check that the app_code is correct
- Ensure you have access to the app
"账号积分额度不足" (Insufficient credits)
- Top up your LinkAI account credits