Install any skill in seconds. Free to start, no credit card required.
Get Started Free →腾讯云智能顾问助手 — 通过 AK/SK 鉴权调用腾讯云智能顾问 API,管理云架构图(查询目录、获取架构列表和详情、获取架构评估结果)及风险评估(查询评估项、按产品/分组/风险等级筛选),支持开通智能顾问服务。当用户要求查看云架构、查询架构目录、获取架构详情、查看架构评估结果、查看风险评估项、巡检项、云资源风险、开通智能顾问等相关操作时使用。
SkillScore56/100
Test results 56
3/3 safety checks passed
0%56%of test cases passed +56 pts
Passed 14 of 25 test cases with the skill, and 0 of 25 without it.
14 fixed0 passed either way11 still failing0 broke
Adds every file the skill has, pinned so you can update it. No account needed.
pip install "decimalai>=0.15"
decimalai skills add tencent-cloudq
claude --plugin-dir "$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.agents"The same install from Python, for a notebook or a setup script.
pip install "decimalai>=0.15"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("tencent-cloudq")
if result.exit_code:
raise SystemExit(result.problems)
print("Added. Start Claude Code with the command below.")claude --plugin-dir "$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.agents"Type these in a Claude Code session. No account or API key. It writes the skill and any files it bundles, and asks first when its safety rating isn't Passed.
/plugin marketplace add decimal-labs/decimalai-claude-plugins
/plugin install decimalai@decimalai/decimalai:install tencent-cloudqThe plugin needs python3 and curl on your machine.
No Python or account. Claude Code picks it up in its next session.
curl -fsSL --create-dirs -o .claude/skills/tencent-cloudq/SKILL.md https://app.decimal.ai/s/tencent-cloudq/SKILL.md.claude/skills/tencent-cloudq/SKILL.mdThis gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[claude-agent-sdk]"
decimalai skills add tencent-cloudqimport asyncio
from claude_agent_sdk import ClaudeAgentOptions
from decimalai.claude_agent_sdk import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
async def main():
question = "Hello!"
async with support.run(question) as run: # one user message, one run
async for message in run.query(options=ClaudeAgentOptions(max_turns=6)):
print(message)
# In a notebook or async code: await main()
asyncio.run(main())Prefer its own loader? ClaudeAgentOptions(plugins=[skills_plugin()], skills="all") reads the same folder. Use one or the other: a skill delivered both ways reaches the prompt twice.
The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[claude-agent-sdk]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("tencent-cloudq")
if result.exit_code:
raise SystemExit(result.problems)
import asyncio
from claude_agent_sdk import ClaudeAgentOptions
from decimalai.claude_agent_sdk import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
async def main():
question = "Hello!"
async with support.run(question) as run: # one user message, one run
async for message in run.query(options=ClaudeAgentOptions(max_turns=6)):
print(message)
# In a notebook or async code: await main()
asyncio.run(main())Prefer its own loader? ClaudeAgentOptions(plugins=[skills_plugin()], skills="all") reads the same folder. Use one or the other: a skill delivered both ways reaches the prompt twice.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/tencent-cloudq/SKILL.mdimport asyncio
from pathlib import Path
from claude_agent_sdk import ClaudeAgentOptions, query
skill = Path(".agents/skills/tencent-cloudq/SKILL.md").read_text()
options = ClaudeAgentOptions(system_prompt=f"You are a helpful agent.\n\n{skill}", max_turns=6)
async def main():
async for message in query(prompt="Hello!", options=options):
print(message)
# In a notebook or async code: await main()
asyncio.run(main())This gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[openai-agents]"
decimalai skills add tencent-cloudqfrom agents import Agent, Runner
from decimalai.openai_agents import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = Agent(
name=support.name,
instructions=support.instructions, # your prompt, then the skill list
tools=[*support.tools], # your tools, then load_skill
)
# In a notebook or async code: result = await Runner.run(agent, "Hello!")
result = Runner.run_sync(agent, "Hello!")Using SandboxAgent? capabilities=[Shell(), decimalai.openai_agents.sandbox_skills()] points its own loader at the same folder.
The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[openai-agents]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("tencent-cloudq")
if result.exit_code:
raise SystemExit(result.problems)
from agents import Agent, Runner
from decimalai.openai_agents import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = Agent(
name=support.name,
instructions=support.instructions, # your prompt, then the skill list
tools=[*support.tools], # your tools, then load_skill
)
# In a notebook or async code: result = await Runner.run(agent, "Hello!")
result = Runner.run_sync(agent, "Hello!")Using SandboxAgent? capabilities=[Shell(), decimalai.openai_agents.sandbox_skills()] points its own loader at the same folder.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/tencent-cloudq/SKILL.mdfrom pathlib import Path
from agents import Agent, Runner
skill = Path(".agents/skills/tencent-cloudq/SKILL.md").read_text()
agent = Agent(name="support", instructions=f"You are a helpful agent.\n\n{skill}")
# In a notebook or async code: result = await Runner.run(agent, "Hello!")
result = Runner.run_sync(agent, "Hello!")This gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[openai]"
decimalai skills add tencent-cloudqimport json
from openai import OpenAI
from decimalai.openai import agent_config
client = OpenAI()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
def lookup_order(order_id: str) -> str:
return f"Order {order_id} shipped yesterday."
# Your tools, as Chat Completions takes them, and what answers each.
TOOLS = [{"type": "function", "function": {
"name": "lookup_order",
"description": "Look up the status of an order.",
"parameters": {"type": "object", "properties": {"order_id": {"type": "string"}},
"required": ["order_id"]},
}}]
FUNCTIONS = {"lookup_order": lookup_order}
question = "Where is order A1001?"
with support.run(question) as run: # one user message, one run
# run.system is your prompt, then the skill list.
messages = [{"role": "system", "content": run.system}, run.message]
while True:
reply = client.chat.completions.create(
model="gpt-5.4-mini",
messages=messages,
tools=[*TOOLS, *run.tools], # your tools, then load_skill
).choices[0].message
messages.append(reply)
if not reply.tool_calls:
break
for call in reply.tool_calls:
# load_skill is answered by the run; your own tools by FUNCTIONS.
function = FUNCTIONS.get(call.function.name)
messages.append(run.tool_result(call) or {
"role": "tool", "tool_call_id": call.id,
"content": function(**json.loads(call.function.arguments)) if function
else f"There is no tool named {call.function.name!r}.",
})
print(reply.content)
# The Responses API takes run.response_tools instead of run.tools.The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[openai]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("tencent-cloudq")
if result.exit_code:
raise SystemExit(result.problems)
import json
from openai import OpenAI
from decimalai.openai import agent_config
client = OpenAI()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
def lookup_order(order_id: str) -> str:
return f"Order {order_id} shipped yesterday."
# Your tools, as Chat Completions takes them, and what answers each.
TOOLS = [{"type": "function", "function": {
"name": "lookup_order",
"description": "Look up the status of an order.",
"parameters": {"type": "object", "properties": {"order_id": {"type": "string"}},
"required": ["order_id"]},
}}]
FUNCTIONS = {"lookup_order": lookup_order}
question = "Where is order A1001?"
with support.run(question) as run: # one user message, one run
# run.system is your prompt, then the skill list.
messages = [{"role": "system", "content": run.system}, run.message]
while True:
reply = client.chat.completions.create(
model="gpt-5.4-mini",
messages=messages,
tools=[*TOOLS, *run.tools], # your tools, then load_skill
).choices[0].message
messages.append(reply)
if not reply.tool_calls:
break
for call in reply.tool_calls:
# load_skill is answered by the run; your own tools by FUNCTIONS.
function = FUNCTIONS.get(call.function.name)
messages.append(run.tool_result(call) or {
"role": "tool", "tool_call_id": call.id,
"content": function(**json.loads(call.function.arguments)) if function
else f"There is no tool named {call.function.name!r}.",
})
print(reply.content)
# The Responses API takes run.response_tools instead of run.tools.No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/tencent-cloudq/SKILL.mdfrom pathlib import Path
from openai import OpenAI
client = OpenAI()
skill = Path(".agents/skills/tencent-cloudq/SKILL.md").read_text()
reply = client.chat.completions.create(
model="gpt-5.4-mini",
messages=[
{"role": "system", "content": f"You are a helpful agent.\n\n{skill}"},
{"role": "user", "content": "Hello!"},
],
).choices[0].messageThis gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[anthropic]"
decimalai skills add tencent-cloudqimport anthropic
from decimalai.anthropic import agent_config
client = anthropic.Anthropic()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
question = "Hello!"
with support.run(question) as run: # one user message, one run
answer = client.beta.messages.tool_runner(
model="claude-haiku-5-5",
max_tokens=4096,
system=run.system, # your prompt, then the skill list
tools=[*run.tools], # your tools, then load_skill
messages=[{"role": "user", "content": question}],
).until_done()The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[anthropic]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("tencent-cloudq")
if result.exit_code:
raise SystemExit(result.problems)
import anthropic
from decimalai.anthropic import agent_config
client = anthropic.Anthropic()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
question = "Hello!"
with support.run(question) as run: # one user message, one run
answer = client.beta.messages.tool_runner(
model="claude-haiku-5-5",
max_tokens=4096,
system=run.system, # your prompt, then the skill list
tools=[*run.tools], # your tools, then load_skill
messages=[{"role": "user", "content": question}],
).until_done()No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/tencent-cloudq/SKILL.mdfrom pathlib import Path
import anthropic
client = anthropic.Anthropic()
skill = Path(".agents/skills/tencent-cloudq/SKILL.md").read_text()
reply = client.messages.create(
model="claude-haiku-5-5",
max_tokens=4096,
system=f"You are a helpful agent.\n\n{skill}",
messages=[{"role": "user", "content": "Hello!"}],
)This gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[google-genai]"
decimalai skills add tencent-cloudqfrom google import genai
from google.genai import types
from decimalai.google_genai import agent_config
client = genai.Client()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
def lookup_order(order_id: str) -> str:
return f"Order {order_id} shipped yesterday."
# Your functions, as declarations for the model, and what answers each.
TOOLS = [{"function_declarations": [{
"name": "lookup_order",
"description": "Look up the status of an order.",
"parameters_json_schema": {"type": "object", "properties": {"order_id": {"type": "string"}},
"required": ["order_id"]},
}]}]
FUNCTIONS = {"lookup_order": lookup_order}
question = "Where is order A1001?"
with support.run(question) as run: # one user message, one run
config = types.GenerateContentConfig(
system_instruction=run.system, # your prompt, then the skill list
tools=[*TOOLS, *run.tool_params], # your functions, then load_skill
)
contents = [{"role": "user", "parts": [{"text": run.message}]}]
while True:
response = client.models.generate_content(
model="gemini-3.5-flash", contents=contents, config=config,
)
if not response.function_calls:
break
contents.append(response.candidates[0].content)
parts = []
for call in response.function_calls:
# load_skill is answered by the run; your own functions by FUNCTIONS.
# A loop of your own rather than automatic function calling, which
# raises KeyError when the model asks for a function you did not pass.
function = FUNCTIONS.get(call.name)
parts.append(run.tool_result(call) or {"function_response": {
"name": call.name, "id": call.id,
"response": {"result": function(**(call.args or {})) if function
else f"There is no function named {call.name!r}."},
}})
contents.append({"role": "user", "parts": parts})
print(response.text)The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[google-genai]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("tencent-cloudq")
if result.exit_code:
raise SystemExit(result.problems)
from google import genai
from google.genai import types
from decimalai.google_genai import agent_config
client = genai.Client()
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
def lookup_order(order_id: str) -> str:
return f"Order {order_id} shipped yesterday."
# Your functions, as declarations for the model, and what answers each.
TOOLS = [{"function_declarations": [{
"name": "lookup_order",
"description": "Look up the status of an order.",
"parameters_json_schema": {"type": "object", "properties": {"order_id": {"type": "string"}},
"required": ["order_id"]},
}]}]
FUNCTIONS = {"lookup_order": lookup_order}
question = "Where is order A1001?"
with support.run(question) as run: # one user message, one run
config = types.GenerateContentConfig(
system_instruction=run.system, # your prompt, then the skill list
tools=[*TOOLS, *run.tool_params], # your functions, then load_skill
)
contents = [{"role": "user", "parts": [{"text": run.message}]}]
while True:
response = client.models.generate_content(
model="gemini-3.5-flash", contents=contents, config=config,
)
if not response.function_calls:
break
contents.append(response.candidates[0].content)
parts = []
for call in response.function_calls:
# load_skill is answered by the run; your own functions by FUNCTIONS.
# A loop of your own rather than automatic function calling, which
# raises KeyError when the model asks for a function you did not pass.
function = FUNCTIONS.get(call.name)
parts.append(run.tool_result(call) or {"function_response": {
"name": call.name, "id": call.id,
"response": {"result": function(**(call.args or {})) if function
else f"There is no function named {call.name!r}."},
}})
contents.append({"role": "user", "parts": parts})
print(response.text)No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/tencent-cloudq/SKILL.mdfrom pathlib import Path
from google import genai
from google.genai import types
client = genai.Client()
skill = Path(".agents/skills/tencent-cloudq/SKILL.md").read_text()
response = client.models.generate_content(
model="gemini-3.5-flash",
contents="Hello!",
config=types.GenerateContentConfig(system_instruction=f"You are a helpful agent.\n\n{skill}"),
)This gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[langchain]" langchain-openai
decimalai skills add tencent-cloudqfrom langchain.agents import create_agent
from decimalai.langchain import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = create_agent(
"openai:gpt-5.4-mini",
tools=[], # your tools; the middleware adds load_skill
middleware=[support.middleware], # your prompt, the skill list and load_skill
)
result = agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[langchain]" langchain-openaifrom decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("tencent-cloudq")
if result.exit_code:
raise SystemExit(result.problems)
from langchain.agents import create_agent
from decimalai.langchain import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = create_agent(
"openai:gpt-5.4-mini",
tools=[], # your tools; the middleware adds load_skill
middleware=[support.middleware], # your prompt, the skill list and load_skill
)
result = agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/tencent-cloudq/SKILL.mdfrom pathlib import Path
from langchain.agents import create_agent
skill = Path(".agents/skills/tencent-cloudq/SKILL.md").read_text()
agent = create_agent("openai:gpt-5.4-mini", tools=[], system_prompt=f"You are a helpful agent.\n\n{skill}")
result = agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})This gets SKILL.md only. The skill's 5 other files are not included.
CrewAI's own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" "crewai>=1.15.27"
decimalai skills add tencent-cloudqimport decimalai.crewai
from crewai import Agent, Crew, Task
agent = Agent(
role="Support", goal="Help the customer", backstory="A support agent.",
llm=llm, # your own CrewAI LLM
skills=decimalai.crewai.skills(), # the installed folder
tools=decimalai.crewai.skill_tools(), # reads a skill's files, runs its scripts
)
task = Task(description="Hello!", expected_output="an answer", agent=agent)
Crew(agents=[agent], tasks=[task]).kickoff()The same install from Python, for a notebook or a setup script. CrewAI's own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" "crewai>=1.15.27"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("tencent-cloudq")
if result.exit_code:
raise SystemExit(result.problems)
import decimalai.crewai
from crewai import Agent, Crew, Task
agent = Agent(
role="Support", goal="Help the customer", backstory="A support agent.",
llm=llm, # your own CrewAI LLM
skills=decimalai.crewai.skills(), # the installed folder
tools=decimalai.crewai.skill_tools(), # reads a skill's files, runs its scripts
)
task = Task(description="Hello!", expected_output="an answer", agent=agent)
Crew(agents=[agent], tasks=[task]).kickoff()No DecimalAI package. CrewAI's own loader reads the folder, and nothing pins or updates it.
.agents/skills/tencent-cloudq/SKILL.mdfrom pathlib import Path
from crewai import Agent, Crew, Task
agent = Agent(
role="Support", goal="Help the customer", backstory="A support agent.",
llm=llm, # your own CrewAI LLM
skills=[Path(".agents/skills")],
)
task = Task(description="Hello!", expected_output="an answer", agent=agent)
Crew(agents=[agent], tasks=[task]).kickoff()This gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[adk]"
decimalai skills add tencent-cloudqfrom decimalai.adk import DecimalAIPlugin, agent_config
from google.adk.agents import LlmAgent
from google.adk.apps import App
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = LlmAgent(
name="support", # ADK needs a Python identifier
model="gemini-3.5-flash",
instruction=support.instruction, # your prompt, then the skill list
tools=[*support.tools], # your tools, then load_skill
)
# DecimalAIPlugin makes each invocation of runners built from this App one trace.
app = App(name="support", root_agent=agent, plugins=[DecimalAIPlugin()])Prefer ADK's own loader? SkillToolset(skills=decimalai.adk.skills(), ...) reads the same folder. Use one or the other: a skill delivered both ways reaches the prompt twice.
The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[adk]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("tencent-cloudq")
if result.exit_code:
raise SystemExit(result.problems)
from decimalai.adk import DecimalAIPlugin, agent_config
from google.adk.agents import LlmAgent
from google.adk.apps import App
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = LlmAgent(
name="support", # ADK needs a Python identifier
model="gemini-3.5-flash",
instruction=support.instruction, # your prompt, then the skill list
tools=[*support.tools], # your tools, then load_skill
)
# DecimalAIPlugin makes each invocation of runners built from this App one trace.
app = App(name="support", root_agent=agent, plugins=[DecimalAIPlugin()])Prefer ADK's own loader? SkillToolset(skills=decimalai.adk.skills(), ...) reads the same folder. Use one or the other: a skill delivered both ways reaches the prompt twice.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/tencent-cloudq/SKILL.mdfrom pathlib import Path
from google.adk.agents import LlmAgent
skill = Path(".agents/skills/tencent-cloudq/SKILL.md").read_text()
agent = LlmAgent(
name="support",
model="gemini-3.5-flash",
instruction=lambda context: f"You are a helpful agent.\n\n{skill}",
)This gets SKILL.md only. The skill's 5 other files are not included.
agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[pydantic-ai]"
decimalai skills add tencent-cloudqfrom pydantic_ai import Agent
from decimalai.pydantic_ai import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = Agent(
"openai:gpt-4o-mini",
name=support.name,
tools=[], # your tools; the capability adds load_skill
capabilities=[support], # your prompt, the skill list and load_skill
)
# In a notebook or async code: result = await agent.run("Hello!")
result = agent.run_sync("Hello!")On the Pydantic AI harness, decimalai.pydantic_ai_harness.skills(project) uses its own loader instead.
The same install from Python, for a notebook or a setup script. agent_config() hands your agent the skill. With no DecimalAI key it reads your project's files and sends nothing. Needs SDK 0.27 or newer.
pip install "decimalai[pydantic-ai]"from decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("tencent-cloudq")
if result.exit_code:
raise SystemExit(result.problems)
from pydantic_ai import Agent
from decimalai.pydantic_ai import agent_config
# With no DECIMAL_API_KEY this reads the skills your project lists, from disk.
support = agent_config("support", fallback="You are a helpful agent.")
agent = Agent(
"openai:gpt-4o-mini",
name=support.name,
tools=[], # your tools; the capability adds load_skill
capabilities=[support], # your prompt, the skill list and load_skill
)
# In a notebook or async code: result = await agent.run("Hello!")
result = agent.run_sync("Hello!")On the Pydantic AI harness, decimalai.pydantic_ai_harness.skills(project) uses its own loader instead.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/tencent-cloudq/SKILL.mdfrom pathlib import Path
from pydantic_ai import Agent
skill = Path(".agents/skills/tencent-cloudq/SKILL.md").read_text()
agent = Agent("openai:gpt-4o-mini", instructions=f"You are a helpful agent.\n\n{skill}")
# In a notebook or async code: result = await agent.run("Hello!")
result = agent.run_sync("Hello!")This gets SKILL.md only. The skill's 5 other files are not included.
Deep Agents' own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" deepagents
decimalai skills add tencent-cloudqimport decimalai.deepagents
from deepagents import create_deep_agent
agent = create_deep_agent(model=model, **decimalai.deepagents.skills())
agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})The default backend reads files but has no shell. To run a skill's scripts, pass skills(backend=LocalShellBackend(...)).
The same install from Python, for a notebook or a setup script. Deep Agents' own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" deepagentsfrom decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("tencent-cloudq")
if result.exit_code:
raise SystemExit(result.problems)
import decimalai.deepagents
from deepagents import create_deep_agent
agent = create_deep_agent(model=model, **decimalai.deepagents.skills())
agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})The default backend reads files but has no shell. To run a skill's scripts, pass skills(backend=LocalShellBackend(...)).
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/tencent-cloudq/SKILL.mdfrom pathlib import Path
from deepagents import create_deep_agent
skill = Path(".agents/skills/tencent-cloudq/SKILL.md").read_text()
agent = create_deep_agent(model=model, system_prompt=f"You are a helpful agent.\n\n{skill}")
agent.invoke({"messages": [{"role": "user", "content": "Hello!"}]})This gets SKILL.md only. The skill's 5 other files are not included.
Its own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" agent-framework
decimalai skills add tencent-cloudqimport asyncio
from agent_framework import Agent
from decimalai.agent_framework import skills
agent = Agent(client=client, instructions="You are a helpful agent.", context_providers=[skills()])
asyncio.run(agent.run("Hello!"))It caches skills by default, so restart the process after decimalai skills update.
The same install from Python, for a notebook or a setup script. Its own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" agent-frameworkfrom decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("tencent-cloudq")
if result.exit_code:
raise SystemExit(result.problems)
import asyncio
from agent_framework import Agent
from decimalai.agent_framework import skills
agent = Agent(client=client, instructions="You are a helpful agent.", context_providers=[skills()])
asyncio.run(agent.run("Hello!"))It caches skills by default, so restart the process after decimalai skills update.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/tencent-cloudq/SKILL.mdimport asyncio
from pathlib import Path
from agent_framework import Agent
skill = Path(".agents/skills/tencent-cloudq/SKILL.md").read_text()
agent = Agent(client=client, instructions=f"You are a helpful agent.\n\n{skill}")
asyncio.run(agent.run("Hello!"))This gets SKILL.md only. The skill's 5 other files are not included.
Strands' own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" strands-agents
decimalai skills add tencent-cloudqfrom decimalai.strands import skills
from strands import Agent
from strands.vended_tools import file_editor, shell
agent = Agent(
model=model, # always pass one: the default is Amazon Bedrock
system_prompt="You are a helpful agent.",
tools=[file_editor, shell],
plugins=[skills()],
)
agent("Hello!")Strands loads an agent's skills once, so build the agent again after decimalai skills update.
The same install from Python, for a notebook or a setup script. Strands' own skill loader reads the installed folder. No DecimalAI account needed.
pip install "decimalai>=0.16" strands-agentsfrom decimalai import skillpkg
# Writes .agents/skills and .decimal/skills.toml. Safe to run twice.
result = skillpkg.add("tencent-cloudq")
if result.exit_code:
raise SystemExit(result.problems)
from decimalai.strands import skills
from strands import Agent
from strands.vended_tools import file_editor, shell
agent = Agent(
model=model, # always pass one: the default is Amazon Bedrock
system_prompt="You are a helpful agent.",
tools=[file_editor, shell],
plugins=[skills()],
)
agent("Hello!")Strands loads an agent's skills once, so build the agent again after decimalai skills update.
No DecimalAI package. The whole skill goes in every prompt, and nothing pins or updates it.
.agents/skills/tencent-cloudq/SKILL.mdfrom pathlib import Path
from strands import Agent
skill = Path(".agents/skills/tencent-cloudq/SKILL.md").read_text()
agent = Agent(model=model, system_prompt=f"You are a helpful agent.\n\n{skill}")
agent("Hello!")This gets SKILL.md only. The skill's 5 other files are not included.
Adds every file the skill has, pinned so you can update it. Cursor, Copilot, Cline and Warp read this folder by themselves.
pip install "decimalai>=0.15"
decimalai skills add tencent-cloudqNo Python or account. Cursor, Copilot, Cline and Warp read this folder by themselves.
curl -fsSL --create-dirs -o .agents/skills/tencent-cloudq/SKILL.md https://app.decimal.ai/s/tencent-cloudq/SKILL.md.agents/skills/tencent-cloudq/SKILL.mdThis gets SKILL.md only. The skill's 5 other files are not included.
Give its text to your model as instructions. No account or package needed.
This gets SKILL.md only. The skill's 5 other files are not included.
Raw files: /s/tencent-cloudq/SKILL.md · /s/tencent-cloudq.json
Fetch the file and give its text to your model as instructions. No account or package needed.
curl -fsSL https://app.decimal.ai/s/tencent-cloudq/SKILL.mdcurl -fsSL https://app.decimal.ai/s/tencent-cloudq.jsonThis gets SKILL.md only. The skill's 5 other files are not included.
You don't need a DecimalAI account.
Saved prompts and skills, pinned versions, and traces of this skill in your runs. DecimalAI does not run your agent.
Claude Code reads files from your project, so DecimalAI config does not apply there.
On Claude Agent SDK: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On OpenAI Agents: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On OpenAI SDK: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On Anthropic: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On Gemini API: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On LangChain: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On CrewAI: set DECIMAL_API_KEY and add decimalai.init(crewai=True) to record runs and skill use. The skill version stays in your repo.
On Google ADK: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On Pydantic AI: save the skill to an agent here, set DECIMAL_API_KEY, and the same code uses it with no command to run. Changes you save reach the next run with no redeploy.
On Deep Agents: set DECIMAL_API_KEY and add decimalai.init(langchain=True) to record runs and skill use. The skill version stays in your repo.
On Microsoft Agent Framework: set DECIMAL_API_KEY and add decimalai.init(otel=True, agent_name="support") to record runs and skill use. The skill version stays in your repo.
On Strands: set DECIMAL_API_KEY and add decimalai.init(otel=True, agent_name="support") to record runs and skill use. The skill version stays in your repo.
Editors read files from your project, so DecimalAI config does not apply there.
Anywhere else: record a use with decimalai.log_skill_activation() inside a trace.
核心能力:通过 AK/SK 鉴权调用腾讯云智能顾问(Tencent Cloud Smart Advisor)API,管理云架构图的目录与详情、获取架构评估结果,以及查询风险评估项。
使用腾讯云 API AK/SK 签名认证(TC3-HMAC-SHA256),通过环境变量配置密钥:
TENCENTCLOUD_SECRET_ID — 腾讯云 SecretId(必填)TENCENTCLOUD_SECRET_KEY — 腾讯云 SecretKey(必填)密钥获取地址:https://console.cloud.tencent.com/cam/capi
环境变量必须永久写入 shell 配置文件,确保新会话中仍然生效:
Linux / macOS(写入 ~/.bashrc 或 ~/.zshrc):
echo 'export TENCENTCLOUD_SECRET_ID="your-secret-id"' >> ~/.bashrc
echo 'export TENCENTCLOUD_SECRET_KEY="your-secret-key"' >> ~/.bashrc
source ~/.bashrc
Windows PowerShell(写入用户级环境变量):
[Environment]::SetEnvironmentVariable("TENCENTCLOUD_SECRET_ID", "your-secret-id", "User")
[Environment]::SetEnvironmentVariable("TENCENTCLOUD_SECRET_KEY", "your-secret-key", "User")
为生成控制台免密登录链接,需要配置 CAM 角色。角色配置分为 检测 和 创建 两个独立步骤,角色创建属于 IAM 写入操作,必须在用户明确同意后才能执行。
运行环境自检脚本,检测依赖、版本更新、密钥、角色配置状态:
python3 {baseDir}/check_env.py
自检脚本 仅做只读检测,不会创建或修改任何资源。返回码含义:
0 = 环境就绪(密钥 + 角色全部正常)1 = Python 版本不满足要求2 = AK/SK 未配置或无效3 = 角色未配置(需要执行步骤二)4 = Skill 版本过旧,请更新 Skill脚本首次运行时会自动检查本地 _meta.json 中的版本号与远端最新版本是否一致,若发现新版本则提示更新并退出(返回码 4)。可通过 --skip-update 参数跳过版本检查。
当 check_env.py 返回码为 3(角色未配置)时,必须向用户展示角色创建方案并等待同意:
向用户说明以下内容:
advisor,仅用于免密登录控制台查看智能顾问信息QcloudAdvisorFullAccess(智能顾问只读访问权限,不影响其他云资源)用户同意后,执行角色创建脚本:
python3 {baseDir}/scripts/create_role.py
脚本输出 JSON 格式结果,success: true 表示创建成功并已保存配置。
用户拒绝时,提供手动配置方式(方式二、三、四)。
运行配置向导,从已有角色中选择,或交互式创建新角色:
python3 {baseDir}/scripts/setup_role.py
只需提供角色名称,系统自动获取账号 UIN。将以下内容写入 shell 配置文件(如 ~/.bashrc 或 ~/.zshrc):
echo 'export TENCENTCLOUD_ROLE_NAME="advisor"' >> ~/.bashrc
source ~/.bashrc
系统会自动调用 API 获取您的账号 UIN,并拼接完整的 roleArn。
手动设置完整的角色 ARN,写入 shell 配置文件(如 ~/.bashrc 或 ~/.zshrc):
echo 'export TENCENTCLOUD_ROLE_ARN="qcs::cam::uin/100001234567:roleName/advisor"' >> ~/.bashrc
source ~/.bashrc
TENCENTCLOUD_TOKEN — 临时密钥 Token(使用临时密钥时设置)TENCENTCLOUD_ROLE_SESSION — 角色会话名称(默认 advisor-session)TENCENTCLOUD_STS_DURATION — 临时凭证有效期秒数(默认 3600,即 1 小时;最大 43200,即 12 小时)注意:所有环境变量均需永久写入 shell 配置文件(如
~/.bashrc、~/.zshrc),export仅对当前会话生效,新开会话会丢失。
系统按以下优先级加载角色配置:
TENCENTCLOUD_ROLE_ARN(完整 ARN)~/.tencent-cloudq/config.jsonTENCENTCLOUD_ROLE_NAME + 自动获取账号 UIN每次操作前必须先执行环境检测。初始化分为 版本检查、环境检测 和 角色创建 三个阶段,角色创建属于 IAM 写入操作,必须在用户明确同意后才能执行。
第一步:运行环境检测
python3 {baseDir}/check_env.py
脚本会依次执行以下检测:
_meta.json 版本,与远端最新版本对比)根据返回码判断状态:
0 = 环境就绪,可以正常使用所有功能1 = Python 版本不满足要求 → 提示用户升级 Python2 = AK/SK 未配置或无效 → 提示用户配置密钥3 = 角色未配置 → 执行第二步4 = Skill 版本过旧 → 提示用户更新 Skill版本检查说明:脚本首次运行时会自动对比本地版本与远端版本。若远端有新版本,脚本会输出当前版本和最新版本号,并以返回码 4 退出。网络不可用或远端接口异常时,版本检查会被跳过,不影响后续检测。可通过 --skip-update 参数主动跳过版本检查。
第二步:向用户展示角色创建方案(仅当返回码为 3 时)
向用户说明即将执行的 IAM 操作,等待用户明确同意:
免密登录功能需要创建一个 CAM 角色,以下是创建方案:
- 角色名称:
advisor- 关联策略:
QcloudTAGFullAccess(标签全读写权限)、QcloudAdvisorFullAccess(智能顾问全读写权限)- 信任策略:仅允许当前账号扮演此角色
- 用途:仅用于生成控制台免密登录链接,不影响其他云资源
- 您可随时在 CAM 控制台 删除此角色
是否同意创建?
第三步:执行角色创建(仅在用户同意后)
python3 {baseDir}/scripts/create_role.py
脚本输出 JSON 格式结果,success: true 表示创建成功。
第四步:再次运行环境检测,确认环境就绪
python3 {baseDir}/check_env.py
返回码 0 表示初始化完成,所有功能可用。
python3 {baseDir}/check_env.py --quiet
静默模式下仅输出错误信息,适合其他脚本调用获取环境状态。角色未配置时返回码 3,不会自动创建角色。
python3 {baseDir}/check_env.py --skip-update
跳过远端版本对比,直接进行后续环境检测。适用于离线环境或已知无需更新的场景。可与 --quiet 组合使用。
所有接口通过统一的签名脚本调用,服务固定参数:
advisoradvisor.tencentcloudapi.com2020-07-21python3 {baseDir}/scripts/tcloud_api.py advisor advisor.tencentcloudapi.com <Action> 2020-07-21 '<payload>' [region]
所有接口频率限制均为 20 次/秒。使用某个接口前,必须先加载对应的接口文档获取参数、返回值和展示规则等详细信息。
| 接口 | 说明 | 必填参数 | 触发词 | 文档 |
|---|---|---|---|---|
DescribeArch | 获取云架构详情 | ArchId、Username | 架构详情、查看架构图 | {baseDir}/references/api/DescribeArch.md |
DescribeArchList | 分页获取云架构列表 | PageNumber、PageSize | 架构列表、所有架构图 | {baseDir}/references/api/DescribeArchList.md |
ListDirectoryV2 | 查询架构目录树 | 无 | 查询目录、目录列表 | {baseDir}/references/api/ListDirectoryV2.md |
ListUnorganizedDirectory | 查询待整理目录 | 无 | 待整理目录、未归类架构 | {baseDir}/references/api/ListUnorganizedDirectory.md |
DescribeStrategies | 获取智能顾问支持的风险评估项列表 | 无 | 风险评估、巡检项、云资源风险 | {baseDir}/references/api/DescribeStrategies.md |
DescribeLastEvaluation | 获取架构评估结果 | ArchId | 架构评估、评估结果、Well-Architected | {baseDir}/references/api/DescribeLastEvaluation.md |
CreateAdvisorAuthorization | 开启智能顾问授权 | 无 | 开通智能顾问、授权智能顾问 | {baseDir}/references/api/CreateAdvisorAuthorization.md |
调用示例:
python3 {baseDir}/scripts/tcloud_api.py advisor advisor.tencentcloudapi.com DescribeArchList 2020-07-21 '{"PageNumber":1,"PageSize":10}'
所有查询接口返回的数据仅限当前 AK/SK 对应账号下的智能顾问数据。向用户展示查询结果时,必须明确告知:
以下结果为当前 AK/SK(SecretId/SecretKey)对应账号下的智能顾问数据。如需查询其他账号的数据,请切换对应的 AK/SK。
TSA 不支持查询其他账号(UIN)的数据。当用户请求查询指定 UIN 的数据时,不执行任何 API 调用,直接返回提示。
判断方式:通过前置检查阶段 check_env.py 输出的账号信息,或调用 GetCallerIdentity 接口获取当前 AK/SK 对应的 UIN。
拦截规则:
拦截时向用户返回:
⚠️ 智能顾问仅支持查询当前 AK/SK 对应账号的数据。当前账号 UIN 为
{当前UIN},无法查询 UIN{用户指定的UIN}的数据。如需查询其他账号的数据,请切换到该账号的 AK/SK。
当查询接口返回空结果(如架构列表为空、评估项为空、目录为空等)时,向用户说明可能的原因:
向用户展示:
查询结果为空,可能原因:
- 当前 AK/SK 对应账号下没有相关数据
- 当前账号可能尚未开通智能顾问服务
如需开通智能顾问,请告知我,我将协助您完成开通(需要您的确认)。
当用户确认需要开通智能顾问时,调用 CreateAdvisorAuthorization 接口。此接口为写入操作,必须经过用户明确同意后才能执行。
开通流程(严格按顺序执行):
第一步:向用户说明开通内容,等待用户明确同意
开通智能顾问服务将会:
- 为当前 AK/SK 对应的账号开通智能顾问服务
- 同步开启报告解读和云架构协作权限
- 开通后可使用架构图管理、风险评估等全部功能
是否同意开通?
第二步:用户同意后执行开通(用户拒绝则不执行)
使用前必须先加载接口文档:{baseDir}/references/api/CreateAdvisorAuthorization.md
python3 {baseDir}/scripts/tcloud_api.py advisor advisor.tencentcloudapi.com CreateAdvisorAuthorization 2020-07-21 '{}'
第三步:告知用户结果并引导下一步操作
成功:
告知用户开通成功
调用免密登录脚本生成智能顾问控制台链接:
python3 {baseDir}/scripts/login_url.py "https://console.cloud.tencent.com/advisor"
向用户展示如下引导信息:
✅ 智能顾问服务已成功开通!
👉 点击进入智能顾问控制台
接下来你可以:
- 手动画架构图:在控制台中新建架构图,拖拽云产品组件绘制你的架构
- 网络扫描自动生图:通过网络拓扑扫描,自动生成当前账号下的云架构图
架构图创建完成后,可以使用智能顾问进行架构治理和风险评估。
失败:展示错误信息,建议用户检查账号权限或联系管理员
当接口返回结果中包含架构图(含 ArchId 字段)时,必须调用免密登录脚本为用户生成腾讯云控制台直达链接。架构图列表场景下,只需为第一张架构图生成免密链接。
⚠️ 重要:免密登录链接每次都必须重新生成,不可缓存或复用之前生成的链接。
需先完成角色配置(见「二、前置检查」),然后调用:
python3 {baseDir}/scripts/login_url.py "<目标页面URL>"
架构图控制台 URL 格式:https://console.cloud.tencent.com/advisor?archId={ArchId}
{
"success": true,
"action": "GenerateLoginURL",
"data": {
"loginUrl": "https://cloud.tencent.com/login/roleAccessCallback?algorithm=sha256&secretId=...&token=...&signature=...&s_url=...",
"targetUrl": "https://console.cloud.tencent.com/advisor?archId=arch-gvqocc25",
"expireSeconds": 3600
},
"requestId": "xxx"
}
| 字段 | 说明 |
|---|---|
loginUrl | 免密登录完整 URL,用户点击可直接跳转控制台 |
targetUrl | 登录后跳转的目标页面 |
expireSeconds | 链接有效期(秒),默认 3600,可通过 TENCENTCLOUD_STS_DURATION 调整 |
免密登录 URL 非常长,严禁直接展示完整 URL,必须以 Markdown 超链接格式展示:
架构图名称:生产环境架构
架构图 ID:arch-gvqocc25
[跳转控制台](免密登录URL)
列表场景(仅第一张架构图附带免密链接):
1. 生产环境架构(arch-abc123)— [跳转控制台](免密登录URL)
2. 测试环境架构(arch-def456)
3. 预发布环境架构(arch-ghi789)
TSA 支持通过插件机制扩展功能。所有插件 Skill 统一存放在 {baseDir}/references/plugins/ 目录下。
references/
├── api/ # API 接口文档
│ ├── DescribeArch.md
│ └── ...
└── plugins/ # 插件 Skill 目录
└── <plugin-name>/ # 每个插件一个子目录
├── SKILL.md # 插件的 Skill 指令文档
└── ... # 插件所需的其他文件
插件 Skill 按需加载。当用户请求涉及某个插件的能力时,AI 助手会自动加载 {baseDir}/references/plugins/<plugin-name>/SKILL.md 获取插件的详细指令。
references/plugins/ 下创建独立的子目录SKILL.md 文件,描述插件的功能、调用方式和输出格式scripts/tcloud_api.py),也可包含自己的脚本所有接口调用的输出均为统一的 JSON 格式,通过 success 字段区分成功与失败。
{
"success": true,
"action": "DescribeArchList",
"data": { ... },
"requestId": "9cbe807c-..."
}
| 字段 | 类型 | 说明 |
|---|---|---|
success | Boolean | 固定为 true |
action | String | 调用的接口名称 |
data | Object | 接口返回的业务数据(已去除 RequestId) |
requestId | String | 腾讯云请求 ID,用于问题排查 |
{
"success": false,
"action": "DescribeArchList",
"error": {
"code": "AuthFailure.SecretIdNotFound",
"message": "The SecretId is not found, please ensure that your SecretId is correct."
},
"requestId": "ed93f3cb-..."
}
| 字段 | 类型 | 说明 |
|---|---|---|
success | Boolean | 固定为 false |
action | String | 调用的接口名称 |
error.code | String | 错误码 |
error.message | String | 错误描述 |
requestId | String | 腾讯云请求 ID(网络错误时为空) |
| 错误码 | 含义 |
|---|---|
MissingParameter | 脚本调用缺少必要参数 |
MissingCredentials | 未配置 AK/SK 环境变量 |
NetworkError | 网络请求失败,无法连接 API |
ParseError | 响应不是有效的 JSON |
| 错误码 | 含义 | 解决方案 |
|---|---|---|
AuthFailure.SecretIdNotFound | SecretId 不存在 | 检查 TENCENTCLOUD_SECRET_ID |
AuthFailure.SignatureFailure | 签名错误 | 检查 TENCENTCLOUD_SECRET_KEY |
AuthFailure.SignatureExpire | 签名过期 | 检查本地时间是否准确 |
AuthFailure.TokenFailure | Token 错误 | 检查 TENCENTCLOUD_TOKEN |
AuthFailure.UnauthorizedOperation | 未授权 | 检查 CAM 策略 |
ResourceNotFound | 资源不存在 | 检查 ArchId 等参数是否正确 |
InvalidParameter | 参数错误 | 检查请求参数格式和类型 |
InvalidParameterValue | 参数取值错误 | 检查参数值范围 |
RequestLimitExceeded | 频率限制 | 降低调用频率(限 20 次/秒) |
QcloudTAGFullAccess 和 QcloudAdvisorFullAccess 策略TENCENTCLOUD_TOKENap-guangzhou,Region 为可选参数TENCENTCLOUD_STS_DURATION 调整(最大 43200 秒,即 12 小时)[跳转控制台](免密登录URL) 超链接形式展示,严禁直接展示完整 URL。每次展示都必须重新调用 login_url.py 生成新链接,不可缓存或复用之前生成的链接https://console.cloud.tencent.com/advisor/assess?strategyName={URL编码后的Name}read_file 加载 {baseDir}/references/api/<Action>.md 获取完整的参数说明、返回字段、展示格式等详细信息CreateAdvisorAuthorization 接口属于写入操作,必须经用户明确同意后才能执行,严禁自动调用本 Skill 需要以下环境变量才能正常运行:
| 环境变量 | 必填 | 说明 |
|---|---|---|
TENCENTCLOUD_SECRET_ID | 是 | 腾讯云 API SecretId |
TENCENTCLOUD_SECRET_KEY | 是 | 腾讯云 API SecretKey |
密钥仅通过环境变量读取,不会被写入文件、日志或网络传输中。
本 Skill 包含以下 CAM(访问管理)操作。写入类操作仅由独立脚本 scripts/create_role.py 执行,且必须在用户明确同意后才会运行。check_env.py 仅执行只读检测操作。
| API 操作 | 类型 | 所在脚本 | 说明 |
|---|---|---|---|
sts:GetCallerIdentity | 只读 | check_env.py / create_role.py | 获取当前账号 UIN |
cam:GetRole | 只读 | check_env.py / create_role.py | 检查角色是否存在 |
cam:DescribeRoleList | 只读 | setup_role.py | 列出可用角色供用户选择 |
cam:CreateRole | 写入 | scripts/create_role.py | 创建 advisor 角色(需用户明确同意后执行) |
cam:AttachRolePolicy | 写入 | scripts/create_role.py | 关联 QcloudAdvisorFullAccess 策略(随角色创建执行) |
sts:AssumeRole | 敏感 | login_url.py | 扮演角色获取临时凭证(用于生成免密登录链接) |
cam:DeleteRole | 写入 | scripts/cleanup.py | 删除 advisor 角色(仅 --cloud 模式,需用户明确确认) |
advisor:CreateAdvisorAuthorization | 写入 | scripts/tcloud_api.py | 开通智能顾问服务(需用户明确同意后执行) |
~/.tencent-cloudq/config.json 仅保存角色 ARN 和账号 UIN,不保存任何密钥700,配置文件设为 600,仅当前用户可读写*.tencentcloudapi.com)和登录域名(cloud.tencent.com)用户可随时运行清理脚本删除本机上的所有配置和缓存:
# 交互式清理(逐项确认)
python3 {baseDir}/scripts/cleanup.py
# 一键清理所有本地配置
python3 {baseDir}/scripts/cleanup.py --all
# 一键清理所有本地配置 + 云端 advisor 角色
python3 {baseDir}/scripts/cleanup.py --all --cloud
清理范围:
~/.tencent-cloudq/(含 config.json){系统临时目录}/.tcloud_advisor_uin_cacheTENCENTCLOUD_* 系列(SECRET_ID、SECRET_KEY、TOKEN、ROLE_ARN、ROLE_NAME、ROLE_SESSION、STS_DURATION),脚本会自动检测已设置的变量并生成对应平台的清理命令(source 脚本 / PowerShell 脚本)advisor(仅 --cloud 模式,需配置 AK/SK)Published skills whose descriptions closely match this one, with their headline benchmark lift.
Skills that do similar work, with their headline benchmark lift.
From the same source and nearby in the catalogue.