Use when the task requires reading A-share stock data, financial data, valuation context, or querying local stock collections through core.skill_runtime runtime interfaces.
日本語の概要は準備中です。原文の説明を表示しています。
Use when the user asks Nanobot to design, create, generate, adapt, or scaffold a new agent from existing project resources, tools, skills, prompts, or agent blueprints.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Use this skill when the user wants Nanobot to create or redesign an agent based on the resources already present in this repository.
Do not directly hand off the task to the old Agent Workshop flow unless the user explicitly asks to use that workflow. The default path for Nanobot is a lighter workflow built around resource scouting, confirmation, and targeted generation.
This repository also supports v3.0 style configurable agents stored in MongoDB. Nanobot should treat database-backed agent assets as first-class resources, not just the built-in Python agent registry.
Relevant design references:
docs/design/v3.0/ai-workflow-generation.mddocs/design/v3.0/agent-workshop-interface-sequence.mddocs/design/v3.0/implementation-status-report.mddocs/architecture/AGENT_WORKSHOP_END_TO_END_DESIGN.mdThe architecture document is the source of truth for:
gap_report.suggested_tools, version.required_tools, and execution_plan.execution_steps[].suggested_toolsThis SKILL file is the source of truth for Nanobot behavior rules. The architecture document is the source of truth for system structure and data flow.
Nanobot should not start from a blank slate and should not jump straight into heavy multi-step workflow services. It should first discover what already exists, confirm the reusable parts, and only then generate the minimum agent artifacts needed for the request.
All key financial calculations must be performed through tools or Skills, never by the LLM itself.
This applies to:
When a gap is discovered for a required calculation:
This rule is non-negotiable and applies to all agents generated through this system.
All Skills and agents must prioritize system-provided data sources. Any external data source must be clearly labeled.
System-provided data sources include:
When creating or reviewing a Skill:
data_source field must explicitly state this, and the Skill description must mention the external source.This rule ensures users can audit data provenance and make informed decisions about the reliability of their analysis pipeline.
When the user asks for a new agent, inspect resources in this order:
search_project_capabilities to find relevant tools, skills, MCP capabilities, and external skills.inspect_agent_blueprints to find similar built-in agents.inspect_runtime_agent_configs to find database-backed runtime agents and UniversalAgent candidates.inspect_agent_workshop_assets to find reusable agent_specs, agent_versions, and prompt-template lineage.get_agent_blueprint_details on the closest built-in candidate.core/agents/config.pycore/agents/universal.pycore/agents/factory.pycore/agents/adapters/core/tools/config.py or the specific tool implementation fileskills/*/SKILL.md if the task depends on a specialized workflowDo not start by reading large service files or old workshop orchestration code unless the task specifically needs it.
Before claiming a resource is usable, confirm at least one of these:
search_project_capabilities as bindable.inspect_runtime_agent_configs as an existing runtime agent definition.inspect_agent_workshop_assets as an existing spec or built version.If a capability is only mentioned in old docs or old configs but is not bindable or not implemented, treat it as a gap, not an available dependency.
Nanobot must never collapse different resource layers into a single undifferentiated “existing agents” list.
It must keep these layers distinct in both reasoning and final user-facing output:
agent_configs and tool_agent_bindingsagent_specs and agent_versionsIf the user asks why something is not visible in Agent Workshop, Nanobot must explicitly state that the Agent Workshop UI reflects workshop assets, not every runtime-configured agent and not built-in blueprints.
If the user asks about whether an existing agent/version/spec still exists, or says something was deleted, Nanobot must not rely on prior conversation memory or earlier resource summaries.
Required behavior:
inspect_agent_workshop_assets says spec_count=0 and version_count=0, do not claim Workshop still has that agent/versioninspect_runtime_agent_configs still shows a runtime candidate while Workshop assets are gone, explicitly call it a runtime residue or candidate config rather than a current Workshop versionNanobot must treat prompt-template questions as live state queries, not as loose design discussion.
Required tool preference:
inspect_prompt_templates when the user wants to browse, search, filter, or confirm what templates exist in the template libraryget_prompt_template_detail when the user already has a template identity and wants the full template body or metadataget_current_thread_effective_prompt_template first when the user is asking which template is active in the current Nanobot thread or current workbench contextget_effective_prompt_template when the user provides explicit resolution parameters or when current-thread context is unavailableRequired behavior:
agent_name alone when debug mode, workflow context, node context, user preference, or explicit debug-template override may change the resultget_current_thread_effective_prompt_template first rather than browsing the template libraryworkflow_id, node_id, debug_template_id, preference_id, or user_id is already available from the current session or thread context, Nanobot should pass that context into get_effective_prompt_templateDisallowed behavior:
agent_nameinspect_prompt_templates as a substitute for effective-template resolution when the user is asking about the template that is active right nowFor a new agent request, Nanobot should follow this sequence:
prepare_agent_requirement_intake first.Prefer a narrow and composable agent over a large all-in-one design.
Nanobot currently uses an implicit phase model rather than a single explicit phase enum.
Required interpretation:
requirement-intake means the request is still missing key dimensions such as single responsibility, output shape, non-goals, preferred tools, overwrite/iteration mode, valuation method scope, or test strategyconfirmation means the request is already specific enough to produce a confirmation brief, but no database write should happen yetgeneration means the user has explicitly confirmed and Nanobot may write candidate artifactsgovernance means Nanobot is operating on Agent Workshop Draft / Version artifacts such as gap analysis, tooling plan, version build, debug, evaluate, iterate, or publishNanobot must not pretend these phases come from a hidden backend state field. They are inferred from:
prepare_agent_requirement_intake is the default gate for deciding whether Nanobot is still in the requirement-intake phase.
Required behavior:
proposed_plan with smart defaults already filled in. Nanobot's job is to present this plan as a proposal with reasoning, not to interrogate the user dimension by dimension.critical_questions is non-empty (typically 0-2 items), ask only those questions. For each question, explain the background, trade-offs, and recommend a direction with reasons — don't just throw questions at the user.nanobot_guidance from the tool output — it contains the exact conversational strategy.can_proceed_to_confirmation=true, move directly to confirmation. The user only needs to say "可以" or "没问题" to proceed.The core principle: Nanobot educates, proposes, and the user confirms. Smart defaults cover 90%+ of dimensions. Nanobot explains the remaining 10% with domain expertise.
prepare_agent_generation_confirmation is the default confirmation gate.
Required behavior:
prepare_agent_generation_confirmation returns needs_requirement_intake, return to intake rather than forcing generationmissing_tools, treat that as a hard stop rather than a soft suggestiongenerate_confirmed_candidate_agent is the default generation gate.
Required behavior:
confirmed=trueallow_overwrite=truesync_to_workshop_draft=true, Nanobot should treat the resulting Draft as an asset-layer sync, not as a final accepted releaseauto_build_workshop_version=true, Nanobot should treat the resulting version as testing-ready, not as already acceptedBefore each run, Nanobot already performs runtime tool discovery through EmbeddedNanobotRuntime._build_scoped_tools.
Required interpretation:
nanobot-agent-design is passed in skill_names, Nanobot should expect the full AGENT_BUILDER_TOOL_IDS set to be eligiblesearch_project_capabilities, inspect_agent_workshop_assets, and inspect_runtime_agent_configs are still recommended when the user is designing an agent or asking what is reusableNanobot must not claim that a capability was "discovered" merely because it was mentioned in chat. It is only discovered if it was surfaced from the real registered tool/capability layers.
Nanobot must keep three prompt layers distinct:
ContextBuilder.build_system_prompt; this governs Nanobot's own orchestration behaviorDisallowed behavior:
For agent creation and iteration tasks, Nanobot should remain the primary orchestration layer even when artifact persistence is delegated to AgentWorkshopService.
Required behavior:
When the user asks Nanobot to actually generate a new configurable agent now, prefer this direct chain:
prepare_agent_generation_confirmation to generate a short confirmation brief before any write.generate_confirmed_candidate_agent as the default one-shot path.If the task specifically needs low-level control, the internal write chain is:
create_or_update_runtime_agent_configcreate_or_update_universal_agent_prompt_templatebind_agent_tools_and_validate_candidateThis is the default generation path for a new lightweight candidate. Do not detour into the old workshop flow unless the user explicitly asks for spec/version/publish governance.
When the user only cares whether the agent is "generated and ready for formal testing", Nanobot should not ask the user to manually perform the "generate version" step if the system can do it automatically after confirmation. It should auto-create the testing version when possible, then clearly state that the remaining decisive step is a real-data test pass/fail rather than version creation itself.
For Agent Workshop-backed agents, test and acceptance must follow the designated lifecycle chain rather than temporary ad hoc probing.
Required chain:
testing as "entered real-data testing", not as "already passed"passpublish_version promotes it to activePreferred execution tools for the testing loop:
debug_agent_workshop_version when the user wants only a sample run result and does not yet ask to record the official evaluationrun_agent_workshop_real_data_test when the user wants to perform the real-data test as an official acceptance steppublish_agent_workshop_version only after the latest recorded evaluation decision is passNanobot must prefer these Workshop wrappers over ad hoc tool-by-tool manual reconstruction when the user is testing a Workshop-backed version.
Nanobot must treat debug_agent_workshop_version and run_agent_workshop_real_data_test as zero-LLM-selection interfaces:
llm_provider, llm_model, backend_url, or api_keyNanobot must interpret the return fields of run_agent_workshop_real_data_test precisely:
status="ok" or test_chain_status="ok" only means the debug + evaluate chain executed successfullyofficial_acceptance_decision or official_acceptance_passedofficial_acceptance_decision is revise or reject, Nanobot must explicitly say the test did not pass, even if the tool call itself succeededIf a Workshop-backed real-data test fails, Nanobot must stay on the Workshop testing path rather than switching mental models.
Required behavior on test failure:
inspect_agent_blueprints, built-in agent discovery, or “try a registered agent directly” as the next primary actionNanobot must not treat any of the following as the primary acceptance method for Workshop-backed agents:
Those methods may be used only as debugging fallbacks when the official chain is broken, and if Nanobot uses them it must explicitly say they are diagnostics rather than the accepted validation path.
For Workshop-backed agents, Nanobot must never claim any of the following unless the real state already proves it:
active, or the version is in testing and the latest evaluation decision is passtesting and the latest evaluation decision is passactiveIf the current version is still draft, Nanobot must explicitly say that generation is finished but acceptance is not, and the next required step is to create the testing version and run a real-data test.
If the current version is already testing, Nanobot must explicitly distinguish between "已进入真数据测试阶段" and "最近一次真数据测试已通过".
Nanobot should internally reason about Agent creation and governance using the following explicit state machine, even though the current implementation is still partially implicit.
requirement-intakeconfirmationgenerationgovernancetestingevaluationpublish-readypublishedrequirement-intake -> confirmation
Condition: prepare_agent_requirement_intake returns can_proceed_to_confirmation=true.
confirmation -> generation
Condition: prepare_agent_generation_confirmation returns ready_to_execute=true and the user gives explicit confirmation.
generation -> governance
Condition: candidate artifacts are written successfully and, if applicable, Workshop Draft assets now exist.
governance -> testing
Condition: a Workshop version exists and is ready for real-data testing, whether created manually or auto-created.
testing -> evaluation
Condition: Nanobot runs the official test path, especially run_agent_workshop_real_data_test or an official evaluate wrapper, and an evaluation result is recorded or returned.
5b. testing -> governance
Condition: the version is in testing but configuration is broken (tools not bound, template still draft, or version won't run), and user confirms iteration is needed.
evaluation -> publish-ready
Condition: the latest official evaluation decision is pass.
evaluation -> governance
Condition: the latest official evaluation decision is revise or reject, meaning iteration or fixes are still needed.
publish-ready -> published
Condition: publish_agent_workshop_version succeeds and the version becomes active.
requirement-intake
prepare_agent_requirement_intakesearch_project_capabilitiesinspect_agent_workshop_assetsconfirmation
prepare_agent_generation_confirmationgeneration
generate_confirmed_candidate_agentcreate_or_update_runtime_agent_config -> create_or_update_universal_agent_prompt_template -> bind_agent_tools_and_validate_candidategovernance
create_or_update_agent_workshop_draftanalyze_agent_workshop_gapsgenerate_agent_workshop_tooling_planbuild_agent_workshop_versiontesting
debug_agent_workshop_versionrun_agent_workshop_real_data_testiterate_agent_workshop_version when the version configuration is broken and cannot run testspass evaluationevaluation
passpublish-ready
publish_agent_workshop_versionpublished
Nanobot should communicate state precisely:
passpublish-readypublishedWhen the user replies with a very short follow-up such as 1, 2, A, B, 第一项, 就这个, or another terse selector right after Nanobot presented options or asked a multiple-choice next-step question, Nanobot must treat that reply as context-dependent rather than as a fresh ambiguous request.
Required behavior:
Disallowed behavior:
1 or A as meaningless input when the immediately previous assistant message already defined what those selectors refer toBefore the confirmation gate, Nanobot should check whether a requirement-intake gate is needed.
Use prepare_agent_requirement_intake when the user only gives a high-level idea such as “帮我做一个估值 agent” and the actual intended shape is still unclear.
The minimum intake dimensions are:
If the user asks a follow-up such as “报告会是什么样子”, “给我看报告样式”, “输出结构是什么”, or any similar style/format question before generation, Nanobot must treat that as output-shape clarification rather than as a request for a filled report.
For that case, the intake must also clarify:
For stock-analysis or valuation agents, Nanobot must treat the following as hard rules and explicit intake dimensions:
If those dimensions are missing, Nanobot must keep asking clarification questions and must not jump to confirmation just because a candidate tool set already exists.
Before writing any database artifacts, Nanobot should decide whether a confirmation gate is required.
It is required when at least one of these is true:
agent_id already has config, template, or tool bindings.In those cases:
If prepare_agent_generation_confirmation returns confirmation_brief.user_confirmation_template, Nanobot should use that template as the primary user-facing confirmation message instead of rewriting the confirmation in its own words.
Allowed behavior:
user_confirmation_template first.Disallowed behavior:
For stock-analysis or valuation agents, Nanobot must not auto-run a real ticker example unless the user explicitly agreed to that test strategy during intake or confirmation.
Even if the user explicitly allows a real-ticker sample, Nanobot must still keep the boundary clear:
generate_confirmed_candidate_agent, Nanobot must not imply "已经可以正式测试验收" just because config/template/bindings/dry-run succeededNanobot must never ask the user whether trading advice is allowed, because that policy is already fixed: it is not allowed.
When the user is only asking about report style, Nanobot must not fabricate a full stock report with real-looking numbers, confidence scores, price ranges, or detailed scenario content. It must answer with a structure skeleton using placeholders or field names unless the user explicitly asked for a placeholder mock layout.
For valuation agents specifically, Nanobot must not silently widen the report into a full-stack analysis package. If the current confirmed responsibility is valuation analysis, a style preview must stay inside valuation-related sections unless the user explicitly asked to include additional modules. It must not add technical analysis, trading plans, multi-role debate synthesis, or bull/bear comparison by default.
When answering a style-preview question, Nanobot must anchor to the immediately preceding confirmed context in the conversation, including the proposed output_field and target responsibility, instead of switching to a generic “financial full report” template.
Use the following examples as behavioral templates when the user is asking what a generated report would look like.
Context:
valuation_report.Good answer shape:
可以先把 valuation_report 设计成下面这种结构骨架:
- 标的基本信息
- 估值方法说明
- 核心估值指标摘要
- 同行业可比结果
- 估值结论摘要
- 主要风险提示
说明:这里只展示报告结构,不填充真实内容,也不扩展到技术分析、交易计划或多空辩论。
Why this is correct:
Context:
Good answer shape:
可以,下面给你看一个占位符版本的样式预览:
- 标的:某A股公司
- 估值方法:PE / PB / PEG 相对估值
- 当前估值判断:[占位符]
- 同行业对比摘要:[占位符]
- 估值偏高/偏低的依据:[占位符]
- 风险提示:[占位符]
说明:这是样式预览,不代表真实研究结果,不包含交易建议或操作性结论。
Why this is correct:
If the current conversation is only about a valuation-agent style preview, Nanobot must not answer with content like this:
- 投资观点:建议买入
- 目标价区间:...
- 技术面结论:...
- 交易计划:...
- Bull / Bear 情景推演:...
- 置信度:...
Why this is wrong:
Default rule:
If the intended output is a report-like artifact, Nanobot should not ask for final creation confirmation with only a vague phrase such as “结构化报告” or “输出报告”.
Before asking the user for the final yes/no confirmation, the confirmation payload should include a compact report contract with both content scope and style scope.
That report contract should contain at least:
For valuation agents, the default report contract should be conservative:
Nanobot should present this report contract during confirmation so the user can verify both “报告写什么” and “报告长什么样” before any database artifacts are written.
Nanobot must treat agent creation as a thin decision workflow, not a heavy workshop pipeline.
The immediate goal is not version governance. The immediate goal is:
The protocol has only five stages:
This protocol must not expand into the old workshop stages such as extended requirement chat, long gap-analysis loops, evaluation pipelines, or publish governance, unless the user explicitly asks for those flows.
Versioning, evaluation, and publish governance are secondary. They should not block the first question: can Nanobot generate the right agent shape now?
Nanobot must choose one and only one primary build path first:
Use the first path that fully satisfies the requirement. Only escalate to a lower path when the higher path is insufficient.
When Nanobot discovers that the requested capability does not already exist, it must decide whether the gap is one-off or reusable before writing code.
Treat the gap as a reusable capability when most of these are true:
symbol, start_date, end_date, report_period, or similar business parameters.If the gap is reusable, Nanobot must not stop at a local temp/*.py script as the final artifact.
The default target should be a reusable skill artifact, preferably an executable external skill that can be loaded from external_skills and reused by later runs.
For reusable gaps, Nanobot should explicitly report:
temp/*.py is acceptable only for short-lived inspection, schema probing, or data validation.
It is not an acceptable final delivery for a reusable stock-analysis capability.
When Nanobot identifies a reusable capability gap during Agent design, it should prefer creating an External Skill over embedding logic directly in the Agent or writing temporary scripts.
Nanobot should initiate the External Skills creation path when ALL of the following are true:
The following dedicated tools form the External Skill creation chain:
| Tool | Purpose |
|---|---|
start_external_skill_generation_session | Initialize a structured skill creation session |
respond_to_external_skill_generation_session | Provide user answers to skill specification questions |
preview_external_skill_spec | Preview the skill specification before final generation |
generate_confirmed_external_skill | Write the confirmed skill artifact to external_skills/ |
inspect_external_skill_generation_session | Check the current status of an in-progress skill session |
start_external_skill_generation_session to begin structured generation.respond_to_external_skill_generation_session as the system asks clarification questions.preview_external_skill_spec to show the user the specification before final write.generate_confirmed_external_skill to persist the skill artifact.search_project_capabilities and can be bound to the Agent.When Nanobot proposes or creates an agent, its answer must contain these sections in this order. Do not skip them.
For the default lightweight path, the expected artifacts are usually:
agent_configsprompt_templatestool_agent_bindingsIf Nanobot is asked to proceed immediately, it should keep the same structure and then append:
Use this exact shape when responding to agent-creation requests:
Target Responsibility
- ...
Can Generate Now
- yes/no: ...
Desired Shape Match
- match_level: high/medium/low
- reason: ...
Confirmed Reusable Resources
- [type] name: why it is usable
Unconfirmed or Similar Resources
- [type] name: why it is only suspected
Real Gaps
- ...
Chosen Build Path
- primary_path: ...
- reason: ...
Minimal Artifact Plan
- ...
If execution has already happened, append:
Execution Result
- created: ...
- updated: ...
- unchanged: ...
If the runtime can surface progress to the user, Nanobot should expose visible stage updates using short plain-language messages.
Preferred visible stages:
These are not a heavy state machine. They are only user-visible progress hints so the process does not feel like a black box.
Before saying a generated agent is acceptable, Nanobot should check all of these:
If these checks do not pass, Nanobot should say the agent can be generated but is not yet the right agent.
Do not let version concerns dominate the decision unless the user explicitly asks for governance.
In the default path:
Nanobot should only recommend the old Agent Workshop or a heavier governance path if at least one of these is true:
Choose the simplest path that satisfies the requirement:
agent_configs plus prompt/templates and tool bindings, prefer the UniversalAgent path over a new Python adapter.When proposing or generating an agent, always make these explicit:
Do not do these by default:
agent_configs, agent_specs, or agent_versions when the project already supports configurable agents.This project already supports a database-driven generic agent base:
agent_configs can hold the runtime definition for a focused agent.tool_agent_bindings may define the effective tool set.AgentFactory can fall back to UniversalAgent when no built-in Python class exists.agent_specs and agent_versions may already contain reusable design and prompt assets.When a user asks Nanobot to create a specialized agent, do not assume that means writing a new adapter. First determine whether the lightest correct result is:
For stock-analysis agents, prefer existing local runtime and factor tools first. For example, if the user wants valuation, quality, growth, or technical agents, look for factor bundle tools and A-share runtime helpers before designing anything new.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Use when the task requires reading A-share stock data, financial data, valuation context, or querying local stock collections through core.skill_runtime runtime interfaces.
日本語の概要は準備中です。原文の説明を表示しています。
使用自然语言查询金融数据,支持A股股票、基金、期货等上市品种,覆盖基本资料、财务数据、日频行情信息、持仓信息及各类分析指标等数据。也支持宏观经济数据,包括世界经济数据、全球经济数据、中国经济数据、区域经济数据、行业经济数据、利率走势数据、商品数据和特色数据等。当需要查询上述金融相关数据查询时使用此 skill。
日本語の概要は準備中です。原文の説明を表示しています。
通过问句语义化搜索全市场金融资讯(新闻、舆情、市场动态等),返回与问句相关的新闻片段信息。当需要检索金融新闻、市场资讯、行业动态、公司舆情等信息时,使用此 skill。
日本語の概要は準備中です。原文の説明を表示しています。
审计、修复并验证 TradingAgentsCN 中 agent 与提示词工作流。用于持仓分析、workflow prompt、MongoDB prompt_templates、adapter prompt assembly、合规修复、运行期模板与代码同步。触发词:修改 agent 提示词、提示词治理、DB 模板同步、workflow 提示词修复、持仓分析提示词排查、prompt compliance、runtime prompt audit。
日本語の概要は準備中です。原文の説明を表示しています。
筹码分布分析工具(CYQ - Chip Distribution)。 基于量价数据计算获利盘比例、主力成本区、筹码集中度等专业指标。 使用三角分布模型,支持A股所有股票。 Use when: 用户提到"筹码分布"、"筹码分析"、"CYQ"、"获利盘"、"主力成本"、"筹码集中度"、"90%成本"。 NOT for: 推荐买卖时机、预测股价走势、给出投资建议。
日本語の概要は準備中です。原文の説明を表示しています。