Env Diagnosis
Environment diagnosis is systematic process of identifying and resolving issues in development environments before they block productivity. This skill provides checklists, automated scripts, and repai
Best use case
Env Diagnosis is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Environment diagnosis is systematic process of identifying and resolving issues in development environments before they block productivity. This skill provides checklists, automated scripts, and repai
Teams using Env Diagnosis should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/env-diagnosis/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Env Diagnosis Compares
| Feature / Agent | Env Diagnosis | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Environment diagnosis is systematic process of identifying and resolving issues in development environments before they block productivity. This skill provides checklists, automated scripts, and repai
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Env Diagnosis
## Skill Profile
*(Select at least one profile to enable specific modules)*
- [ ] **DevOps**
- [x] **Backend**
- [ ] **Frontend**
- [ ] **AI-RAG**
- [ ] **Security Critical**
## Overview
Environment diagnosis is systematic process of identifying and resolving issues in development environments before they block productivity. This skill provides checklists, automated scripts, and repair protocols for common environment problems including version mismatches, permission issues, port conflicts, and dependency conflicts.
**When to use this skill:** When experiencing environment issues, when setting up a new development environment, or when encountering "it works on my machine" problems.
---
## Why This Matters
- **<Benefit>**: <short explanation>
- **<Benefit>**: <short explanation>
- **<Benefit>**: <short explanation>
## Core Concepts & Rules
### 1. Core Principles
- Follow established patterns and conventions
- Maintain consistency across codebase
- Document decisions and trade-offs
### 2. Implementation Guidelines
- Start with the simplest viable solution
- Iterate based on feedback and requirements
- Test thoroughly before deployment
## Inputs / Outputs / Contracts
* **Inputs**:
- <e.g., env vars, request payload, file paths, schema>
* **Entry Conditions**:
- <Pre-requisites: e.g., Repo initialized, DB running, specific branch checked out>
* **Outputs**:
- <e.g., artifacts (PR diff, docs, tests, dashboard JSON)>
* **Artifacts Required (Deliverables)**:
- <e.g., Code Diff, Unit Tests, Migration Script, API Docs>
* **Acceptance Evidence**:
- <e.g., Test Report (screenshot/log), Benchmark Result, Security Scan Report>
* **Success Criteria**:
- <e.g., p95 < 300ms, coverage ≥ 80%>
## Skill Composition
* **Depends on**: None
* **Compatible with**: None
* **Conflicts with**: None
* **Related Skills**: None
## Quick Start
#
## Assumptions
- Developer has access to terminal
- Version managers (nvm, pyenv) are available
- Sufficient permissions to make changes
## Compatibility
- Works on Linux, macOS, Windows (with WSL)
- Language-agnostic diagnosis principles
- Can be adapted to different environments
---
## Test Scenario Matrix
| Scenario | Diagnosis | Fix | Notes |
|----------|-----------|-----|-------|
| Node version mismatch | Check `node --version` vs `.nvmrc` | Use `nvm install` | Requires nvm |
| Port in use | Check `lsof -i :<port>` | Kill process | Verify correct process |
| Permission denied | Check `ls -la` | Use `chown` | May need sudo |
| Dependency conflict | Check `npm ls` | Clean install | May need to clear cache |
---
## Technical Guardrails & Security Threat Model
### 1. Security & Privacy (Threat Model)
* **Top Threats**: Injection attacks, authentication bypass, data exposure
- [ ] **Data Handling**: Sanitize all user inputs to prevent Injection attacks. Never log raw PII
- [ ] **Secrets Management**: No hardcoded API keys. Use Env Vars/Secrets Manager
- [ ] **Authorization**: Validate user permissions before state changes
### 2. Performance & Resources
- [ ] **Execution Efficiency**: Consider time complexity for algorithms
- [ ] **Memory Management**: Use streams/pagination for large data
- [ ] **Resource Cleanup**: Close DB connections/file handlers in finally blocks
### 3. Architecture & Scalability
- [ ] **Design Pattern**: Follow SOLID principles, use Dependency Injection
- [ ] **Modularity**: Decouple logic from UI/Frameworks
### 4. Observability & Reliability
- [ ] **Logging Standards**: Structured JSON, include trace IDs `request_id`
- [ ] **Metrics**: Track `error_rate`, `latency`, `queue_depth`
- [ ] **Error Handling**: Standardized error codes, no bare except
- [ ] **Observability Artifacts**:
- **Log Fields**: timestamp, level, message, request_id
- **Metrics**: request_count, error_count, response_time
- **Dashboards/Alerts**: High Error Rate > 5%
## Agent Directives & Error Recovery
*(ข้อกำหนดสำหรับ AI Agent ในการคิดและแก้ปัญหาเมื่อเกิดข้อผิดพลาด)*
- **Thinking Process**: Analyze root cause before fixing. Do not brute-force.
- **Fallback Strategy**: Stop after 3 failed test attempts. Output root cause and ask for human intervention/clarification.
- **Self-Review**: Check against Guardrails & Anti-patterns before finalizing.
- **Output Constraints**: Output ONLY the modified code block. Do not explain unless asked.
## Definition of Done
- [ ] Diagnosis protocol documented
- [ ] Version checking procedures
- [ ] Permission diagnosis and fixes
- [ ] Port conflict resolution
- [ ] Dependency issue resolution
- [ ] Automated repair scripts
- [ ] Quick reference guide
- [ ] Common pitfalls documented
- [ ] Additional resources linked
---
## Anti-patterns / Pitfalls
* ⛔ **Don't**: Log PII, catch-all exception, N+1 queries
* ⚠️ **Watch out for**: Common symptoms and quick fixes
* 💡 **Instead**: Use proper error handling, pagination, and logging
## Reference Links
- [Node Version Manager (nvm)](https://github.com/nvm-sh/nvm)
- [Python Version Manager (pyenv)](https://github.com/pyenv/pyenv)
- [Docker Troubleshooting](https://docs.docker.com/engine/troubleshooting/)
- [Linux Permissions Guide](https://linuxjourney.com/lesson/file-permissions)
## Versioning & Changelog
* **Version**: 1.0.0
* **Changelog**:
- 2026-02-22: Initial version with complete template structureRelated Skills
bgo
Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.
moai-lang-r
R 4.4+ best practices with testthat 3.2, lintr 3.2, and data analysis patterns.
moai-lang-python
Python 3.13+ development specialist covering FastAPI, Django, async patterns, data science, testing with pytest, and modern Python features. Use when developing Python APIs, web applications, data pipelines, or writing tests.
moai-icons-vector
Vector icon libraries ecosystem guide covering 10+ major libraries with 200K+ icons, including React Icons (35K+), Lucide (1000+), Tabler Icons (5900+), Iconify (200K+), Heroicons, Phosphor, and Radix Icons with implementation patterns, decision trees, and best practices.
moai-foundation-trust
Complete TRUST 4 principles guide covering Test First, Readable, Unified, Secured. Validation methods, enterprise quality gates, metrics, and November 2025 standards. Enterprise v4.0 with 50+ software quality standards references.
moai-foundation-memory
Persistent memory across sessions using MCP Memory Server for user preferences, project context, and learned patterns
moai-foundation-core
MoAI-ADK's foundational principles - TRUST 5, SPEC-First TDD, delegation patterns, token optimization, progressive disclosure, modular architecture, agent catalog, command reference, and execution rules for building AI-powered development workflows
moai-cc-claude-md
Authoring CLAUDE.md Project Instructions. Design project-specific AI guidance, document workflows, define architecture patterns. Use when creating CLAUDE.md files for projects, documenting team standards, or establishing AI collaboration guidelines.
moai-alfred-language-detection
Auto-detects project language and framework from package.json, pyproject.toml, etc.
mnemonic
Unified memory system - aggregates communications and AI sessions across all channels into searchable, analyzable memory
mlops
MLflow, model versioning, experiment tracking, model registry, and production ML systems
ml-pipeline
Use when building ML pipelines, orchestrating training workflows, automating model lifecycle, implementing feature stores, or managing experiment tracking systems.