alrcatraz/astra-aiagent-infra/pre-action-research
Claude Code and agent skill by alrcatraz/astra-aiagent-infra
- community
Checking that the SKILL.md file is still in the repository.
Mandatory research and index lookup before taking action. When investigation, credentials, preferences, devices, services, or project information is involved, consult documentation, tutorials, and reference indexes before proceeding.
Install
npx vskill@latest install alrcatraz/astra-aiagent-infra/pre-action-researchSKILL.md
The same SKILL.md was published earlier as alrcatraz/astra-aiagent-infra/pre-action-research.
pre-action-research
Trigger Conditions
This skill is automatically loaded when the task involves:
- Investigation, research, analysis, planning, proposing a solution
- Credentials, preferences, devices, services, projects, indexes
- Any need to query, record, or update persistent information
Also triggered by: 排查、调查、研究、调研、分析、方案、计划、凭证、偏好、设备、服务、项目、索引、查询、记录
Routing: Prefer loadingexecution-frameworkfirst; it will route here when the task involves research or planning.
- 任何需要查询、记录或更新持久化信息的事项
Checklist
- [ ] 是否涉及需要查询的信息类型?(凭证/偏好/设备/服务/项目/决策记录)
- [ ] 是 → 查本地参考索引,确认存放规则和访问方式
- [ ] 凭证相关 → 详见
references/credential-yaml-schema.md(分组、YAML 结构、加密方式) - 完整凭据查询协议、三层解密方法、sudo 注入等详见 `credential-store-management` skill
- [ ] 需要密码/sudo → 先查 GPG 凭据库,不要问用户要。 解密:
gpg --batch --decrypt --pinentry-mode loopback --passphrase "$PW" ~/Documents/credentials/*.gpg。凭据库里也没有 → 再去问用户。详见credential-store-managementskill 的完整三层协议。 - [ ] 是否有相关文档、官方资料或教程可以参考?
- [ ] 是 → 先查阅,分析后再提方案,不跳过调研直接动手
- [ ] 方案是否已形成并获得用户批准?
- [ ] 否 → 先提方案,等批准再执行
- [ ] 特别警惕「修一个明显的问题」——知道要修什么 ≠ 知道怎么修。 即使问题很明确(如 badge 报错、文案笔误、版本号过时),方案层面仍然有多个选择(删掉/替换/换服务商),需要先讨论再动手。不要把「诊断结论」和「治疗方案」合并成一步。
- [ ] 批准要用用户明确的许可指令(如"可以""好的""开干"),不能拿用户的提问/反馈当作隐含许可。
- [ ] 是否需要做 Environment Baseline(环境基线)检查?
- 适用场景:SSH 到新机器、排查服务异常、部署前验证、系统健康审计、维护窗口前评估
- 逐项收集以下信息(非破坏性、纯只读命令,在所有 Linux 上安全执行):
- [ ] systemd 服务状态 —
systemctl list-units --type=service --state=running(只看 running,避免噪声);如有异常关注systemctl list-units --type=service --state=failed - [ ] 监听端口 —
ss -tlnp(TCP listening ports + 进程名)。注意 0.0.0.0 vs 127.0.0.1 的暴露面差异;高风险端口(22, 5432, 6379, 27017, 3306, 9200, 9090, 3000, 8080)如有 0.0.0.0 绑定需特别记录 - [ ] Docker 容器状态 —
docker ps -a(含已停止容器),关注 restart policy 和状态。同时docker stats --no-stream 2>/dev/null看资源占用(CPU/内存) - [ ] 挂载点与磁盘 —
df -h看磁盘使用率(>80% 标黄,>90% 标红),mount | grep -E '^/dev|^tmpfs|nfs|cifs'看关键挂载 - [ ] crontab 条目 — 检查
/var/spool/cron/crontabs/和/etc/crontab,以及crontab -l(当前用户);关注高频率定时任务是否可能冲突 - [ ] 网络配置 —
ip addr(接口与 IP)、ip route(路由表)、ip neigh(ARP 表,看可见的局域网设备数)。如有resolvectl status也收集 DNS 配置 - [ ] 内核/发行版信息 —
uname -a和cat /etc/os-release - [ ] 将收集到的基线信息写入会话上下文(不需要持久化,除非是
server-health-audit等需要审计留痕的场景)
Pitfalls
- 不要跳过查索引直接凭记忆操作。 记忆中的信息可能过时或不完整。先用索引确认最新规则。
- "新旧"不是跳过索引的理由。 无论是读取已有的还是记录新的,第一步都是查索引确认规范。
- 用户给出 GitHub `user/repo` 名时,直接 GitHub 访问,不要先搜本地文件系统。 用户给的仓库名是确定的,本地找不到不等于不存在。先试
git ls-remote或 API 检查可见性,再决定是否需要代理或凭据。 - "不知道密码就找用户要"是个坑。 凭据优先走 GPG 加密文件或 KeePassXC:详见
credential-store-managementskill 的三层查询协议。只有所有凭据库里确实没有时才问用户。 - 偏好记录目标:Fact Store,不是 memory。 SOUL.md §5.1-5.2 规定:简短结构化偏好 → Fact Store(
user_pref类别);完整参考文档 →dynamic_ref知识库;地图索引 → 本地参考索引。memory(持久记忆)用于环境事实、项目约定和工具习惯,不是偏好的存放处。用户说出偏好 → 直接fact_store(action='add', category='user_pref'),不要在memory里记偏好。 - 不要因为改动小就跳过批准步骤。 badge 地址错误、文案措辞、README 格式、版本号这些看似"直接改更快"的改动,仍然要先提方案再等批准。用户精确的纠正:"你在定方案阶段跳过我的许可了,这非常坏"。正确流程:① 发现问题 → ② 提方案列选项给权衡 → ③ 等用户明确说"可以/好的/开干" → ④ 执行。禁止模式:诊断 + 动手合并成一步。
尤其警惕 README 和文档变更。 技术代码改动大家天然会等批准,但文档排版、badge 去留、文案措辞这些容易自己觉得"明显该这么做"就顺手改了——反而正是用户容易有明确偏好的地方。文档改动同样需要方案 + 批准。
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingwork-principles/skills/pre-action-research/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alrcatraz/astra-aiagent-infra/pre-action-research)