File contents company-analyzer
企业深度分析引擎——多框架 LLM 分析,带缓存、成本追踪、速率限制
使用场景
对上市公司进行全面分析(基本面、技术面、竞争格局等)
多分析框架并行执行(如 SWOT、估值模型、行业分析等)
预算控制下的批量公司分析
作为 CRO(研究官)的核心分析工具
使用方法
# Shell 库引用方式(在分析脚本中 source)
source ~/clawd/skills/company-analyzer/scripts/lib/api-client.sh
source ~/clawd/skills/company-analyzer/scripts/lib/cache.sh
source ~/clawd/skills/company-analyzer/scripts/lib/cost-tracker.sh
# 调用 LLM 分析
result=$(call_llm_api "分析 AAPL 的竞争优势" 8192)
content=$(extract_content "$result")
prompt_tokens output_tokens=$(extract_usage "$result" "$original_prompt")
# 缓存管理
key=$(cache_key "AAPL" "01-swot" "$prompt")
cached=$(cache_get "$key") # 返回缓存或空
cache_set "$key" "$response" '{"framework":"swot"}'
# 成本追踪
log_cost "AAPL" "swot" 1500 3000 # 记录 API 调用成本
check_budget # 检查是否超预算(默认 $0.10/天)
核心模块
模块
文件
说明
API Client
scripts/lib/api-client.sh
配置驱动的 LLM 客户端,自动读 OpenClaw 配置
Cache
scripts/lib/cache.sh
SHA256 键 + 7 天 TTL 持久化缓存
Cost Tracker
scripts/lib/cost-tracker.sh
动态价格查找 + 日预算检查
Trace
scripts/lib/trace.sh
日志追踪
Prices
scripts/lib/prices.json
各模型 token 单价表
配置要求
Bash 4+, jq, bc, curl
OpenClaw 配置:~/.openclaw/openclaw.json(模型/提供商/密钥)
认证配置:~/.openclaw/agents/main/agent/auth-profiles.json
默认日预算:$0.10(可修改 DAILY_BUDGET 变量)
相关文件
scripts/lib/api-client.sh — LLM API 客户端(速率限制、重试、降级)
scripts/lib/cache.sh — 生产级持久化缓存
scripts/lib/cost-tracker.sh — 动态成本追踪
scripts/lib/prices.json — 模型价格表
scripts/lib/trace.sh — 日志工具
1 --- 2 name: company-analyzer 3 description: company-analyzer 4 --- 5 # company-analyzer 6 > 企业深度分析引擎——多框架 LLM 分析,带缓存、成本追踪、速率限制 7 8 ## 使用场景 9 - 对上市公司进行全面分析(基本面、技术面、竞争格局等) 10 - 多分析框架并行执行(如 SWOT、估值模型、行业分析等) 11 - 预算控制下的批量公司分析 12 - 作为 CRO(研究官)的核心分析工具 13 14 ## 使用方法 15 ```bash 16 # Shell 库引用方式(在分析脚本中 source) 17 source ~/clawd/skills/company-analyzer/scripts/lib/api-client.sh 18 source ~/clawd/skills/company-analyzer/scripts/lib/cache.sh 19 source ~/clawd/skills/company-analyzer/scripts/lib/cost-tracker.sh 20 21 # 调用 LLM 分析 22 result=$(call_llm_api "分析 AAPL 的竞争优势" 8192) 23 content=$(extract_content "$result") 24 prompt_tokens output_tokens=$(extract_usage "$result" "$original_prompt") 25 26 # 缓存管理 27 key=$(cache_key "AAPL" "01-swot" "$prompt") 28 cached=$(cache_get "$key") # 返回缓存或空 29 cache_set "$key" "$response" '{"framework":"swot"}' 30 31 # 成本追踪 32 log_cost "AAPL" "swot" 1500 3000 # 记录 API 调用成本 33 check_budget # 检查是否超预算(默认 $0.10/天) 34 ``` 35 36 ## 核心模块 37 | 模块 | 文件 | 说明 | 38 |------|------|------| 39 | API Client | `scripts/lib/api-client.sh` | 配置驱动的 LLM 客户端,自动读 OpenClaw 配置 | 40 | Cache | `scripts/lib/cache.sh` | SHA256 键 + 7 天 TTL 持久化缓存 | 41 | Cost Tracker | `scripts/lib/cost-tracker.sh` | 动态价格查找 + 日预算检查 | 42 | Trace | `scripts/lib/trace.sh` | 日志追踪 | 43 | Prices | `scripts/lib/prices.json` | 各模型 token 单价表 | 44 45 ## 配置要求 46 - Bash 4+, jq, bc, curl 47 - OpenClaw 配置:`~/.openclaw/openclaw.json`(模型/提供商/密钥) 48 - 认证配置:`~/.openclaw/agents/main/agent/auth-profiles.json` 49 - 默认日预算:$0.10(可修改 `DAILY_BUDGET` 变量) 50 51 ## 相关文件 52 - `scripts/lib/api-client.sh` — LLM API 客户端(速率限制、重试、降级) 53 - `scripts/lib/cache.sh` — 生产级持久化缓存 54 - `scripts/lib/cost-tracker.sh` — 动态成本追踪 55 - `scripts/lib/prices.json` — 模型价格表 56 - `scripts/lib/trace.sh` — 日志工具
aAAaqwq/AGI-Super-Skills/tree/main/skills/company-analyzer commit 41a89cad73
Frequently asked questions How do I install the Company Analyzer skill? Run npx skillmds@latest add aaaaqwq/company-analyzer in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Company Analyzer skill do? company-analyzer It is listed under Coding & Dev Tools on SkillMD.
Is Company Analyzer safe to use? This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Company Analyzer? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Company Analyzer free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Company Analyzer? aAAaqwq (@aaaaqwq) published this skill. Their other Agent Skills are listed on their SkillMD profile.