@agentskillkit/agent-skills 3.2.1 → 3.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/skills/mobile-design/scripts/mobile_audit.js +333 -0
- package/.agent/skills/typescript-expert/scripts/ts_diagnostic.js +227 -0
- package/README.md +197 -720
- package/package.json +4 -4
- package/packages/cli/lib/audit.js +2 -2
- package/packages/cli/lib/auto-learn.js +8 -8
- package/packages/cli/lib/eslint-fix.js +1 -1
- package/packages/cli/lib/fix.js +5 -5
- package/packages/cli/lib/hooks/install-hooks.js +4 -4
- package/packages/cli/lib/hooks/lint-learn.js +4 -4
- package/packages/cli/lib/knowledge-index.js +4 -4
- package/packages/cli/lib/knowledge-metrics.js +2 -2
- package/packages/cli/lib/knowledge-retention.js +3 -3
- package/packages/cli/lib/knowledge-validator.js +3 -3
- package/packages/cli/lib/learn.js +10 -10
- package/packages/cli/lib/recall.js +1 -1
- package/packages/cli/lib/skill-learn.js +2 -2
- package/packages/cli/lib/stats.js +3 -3
- package/packages/cli/lib/ui/dashboard-ui.js +222 -0
- package/packages/cli/lib/ui/help-ui.js +41 -18
- package/packages/cli/lib/ui/index.js +57 -5
- package/packages/cli/lib/ui/settings-ui.js +292 -14
- package/packages/cli/lib/ui/stats-ui.js +93 -43
- package/packages/cli/lib/watcher.js +2 -2
- package/packages/kit/kit.js +89 -0
- package/packages/kit/lib/agents.js +208 -0
- package/packages/kit/lib/commands/analyze.js +70 -0
- package/packages/kit/lib/commands/cache.js +65 -0
- package/packages/kit/lib/commands/doctor.js +75 -0
- package/packages/kit/lib/commands/help.js +155 -0
- package/packages/kit/lib/commands/info.js +38 -0
- package/packages/kit/lib/commands/init.js +39 -0
- package/packages/kit/lib/commands/install.js +803 -0
- package/packages/kit/lib/commands/list.js +43 -0
- package/packages/kit/lib/commands/lock.js +57 -0
- package/packages/kit/lib/commands/uninstall.js +307 -0
- package/packages/kit/lib/commands/update.js +55 -0
- package/packages/kit/lib/commands/validate.js +69 -0
- package/packages/kit/lib/commands/verify.js +56 -0
- package/packages/kit/lib/config.js +81 -0
- package/packages/kit/lib/helpers.js +196 -0
- package/packages/kit/lib/helpers.test.js +60 -0
- package/packages/kit/lib/installer.js +164 -0
- package/packages/kit/lib/skills.js +119 -0
- package/packages/kit/lib/skills.test.js +109 -0
- package/packages/kit/lib/types.js +82 -0
- package/packages/kit/lib/ui.js +329 -0
- package/.agent/skills/mobile-design/scripts/mobile_audit.py +0 -670
- package/.agent/skills/requirements-python.txt +0 -25
- package/.agent/skills/requirements.txt +0 -96
- package/.agent/skills/typescript-expert/scripts/ts_diagnostic.py +0 -203
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Python Dependencies for Agent Skill Kit v3.2.0
|
|
2
|
-
# Skill-level validation scripts
|
|
3
|
-
|
|
4
|
-
# Security Scanning
|
|
5
|
-
bandit>=1.7.5
|
|
6
|
-
safety>=2.3.0
|
|
7
|
-
|
|
8
|
-
# Testing & Automation
|
|
9
|
-
playwright>=1.40.0
|
|
10
|
-
pytest>=7.4.0
|
|
11
|
-
|
|
12
|
-
# Code Quality
|
|
13
|
-
pylint>=3.0.0
|
|
14
|
-
mypy>=1.7.0
|
|
15
|
-
|
|
16
|
-
# Data Processing
|
|
17
|
-
pyyaml>=6.0
|
|
18
|
-
requests>=2.31.0
|
|
19
|
-
|
|
20
|
-
# Optional: Performance & Analysis
|
|
21
|
-
# numpy>=1.24.0
|
|
22
|
-
# pandas>=2.0.0
|
|
23
|
-
|
|
24
|
-
# Optional: ML for SelfEvolution
|
|
25
|
-
# scikit-learn>=1.3.0
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
# Python Dependencies
|
|
2
|
-
|
|
3
|
-
## Minimum Requirements
|
|
4
|
-
|
|
5
|
-
- **Python Version:** 3.8+
|
|
6
|
-
- **pip:** Latest version recommended
|
|
7
|
-
|
|
8
|
-
## Installation
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
# Install all Python dependencies for skill scripts
|
|
12
|
-
pip install -r .agent/skills/requirements.txt
|
|
13
|
-
|
|
14
|
-
# Or via npm
|
|
15
|
-
npm run install:python-deps
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Core Dependencies
|
|
19
|
-
|
|
20
|
-
### Security Scanning
|
|
21
|
-
- `bandit>=1.7.5` - Python AST-based security linter
|
|
22
|
-
- `safety>=2.3.0` - Checks Python dependencies for known vulnerabilities
|
|
23
|
-
|
|
24
|
-
### Testing & Automation
|
|
25
|
-
- `playwright>=1.40.0` - End-to-end browser testing
|
|
26
|
-
- `pytest>=7.4.0` - Python testing framework
|
|
27
|
-
|
|
28
|
-
### Code Quality
|
|
29
|
-
- `pylint>=3.0.0` - Python code static checker
|
|
30
|
-
- `mypy>=1.7.0` - Static type checker for Python
|
|
31
|
-
|
|
32
|
-
### Data Processing
|
|
33
|
-
- `pyyaml>=6.0` - YAML parser and emitter
|
|
34
|
-
- `requests>=2.31.0` - HTTP library
|
|
35
|
-
|
|
36
|
-
## Optional Dependencies
|
|
37
|
-
|
|
38
|
-
Some skill scripts may require additional packages:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
# Performance auditing (Lighthouse wrapper)
|
|
42
|
-
npm install -g lighthouse
|
|
43
|
-
|
|
44
|
-
# Accessibility testing
|
|
45
|
-
pip install axe-selenium
|
|
46
|
-
|
|
47
|
-
# ML/Data analysis (for SelfEvolution)
|
|
48
|
-
pip install pandas scikit-learn
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Verification
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
# Verify Python installation
|
|
55
|
-
python --version # Should be 3.8+
|
|
56
|
-
|
|
57
|
-
# Test critical scripts
|
|
58
|
-
python .agent/skills/SecurityScanner/scripts/security_scan.py --help
|
|
59
|
-
python .agent/skills/DesignSystem/scripts/ux_audit.py --help
|
|
60
|
-
python .agent/skills/PerfOptimizer/scripts/lighthouse_audit.py --help
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Usage in CI/CD
|
|
64
|
-
|
|
65
|
-
GitHub Actions example:
|
|
66
|
-
|
|
67
|
-
```yaml
|
|
68
|
-
- name: Setup Python
|
|
69
|
-
uses: actions/setup-python@v4
|
|
70
|
-
with:
|
|
71
|
-
python-version: '3.11'
|
|
72
|
-
|
|
73
|
-
- name: Install Python dependencies
|
|
74
|
-
run: pip install -r .agent/skills/requirements.txt
|
|
75
|
-
|
|
76
|
-
- name: Run skill validation
|
|
77
|
-
run: npm run verify http://localhost:3000
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Maintenance
|
|
81
|
-
|
|
82
|
-
Update dependencies regularly:
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
# Update all packages
|
|
86
|
-
pip install --upgrade -r .agent/skills/requirements.txt
|
|
87
|
-
|
|
88
|
-
# Check for security vulnerabilities
|
|
89
|
-
pip-audit
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## See Also
|
|
93
|
-
|
|
94
|
-
- [PYTHON_STRATEGY.md](../PYTHON_STRATEGY.md) - Architecture decision
|
|
95
|
-
- [MIGRATION.md](../MIGRATION.md) - Migration history
|
|
96
|
-
- [PYTHON_SCRIPTS.md](PYTHON_SCRIPTS.md) - Script reference
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
TypeScript Project Diagnostic Script
|
|
4
|
-
Analyzes TypeScript projects for configuration, performance, and common issues.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
import subprocess
|
|
8
|
-
import sys
|
|
9
|
-
import os
|
|
10
|
-
import json
|
|
11
|
-
from pathlib import Path
|
|
12
|
-
|
|
13
|
-
def run_cmd(cmd: str) -> str:
|
|
14
|
-
"""Run shell command and return output."""
|
|
15
|
-
try:
|
|
16
|
-
result = subprocess.run(cmd, shell=True, capture_output=True, text=True)
|
|
17
|
-
return result.stdout + result.stderr
|
|
18
|
-
except Exception as e:
|
|
19
|
-
return str(e)
|
|
20
|
-
|
|
21
|
-
def check_versions():
|
|
22
|
-
"""Check TypeScript and Node versions."""
|
|
23
|
-
print("\n📦 Versions:")
|
|
24
|
-
print("-" * 40)
|
|
25
|
-
|
|
26
|
-
ts_version = run_cmd("npx tsc --version 2>/dev/null").strip()
|
|
27
|
-
node_version = run_cmd("node -v 2>/dev/null").strip()
|
|
28
|
-
|
|
29
|
-
print(f" TypeScript: {ts_version or 'Not found'}")
|
|
30
|
-
print(f" Node.js: {node_version or 'Not found'}")
|
|
31
|
-
|
|
32
|
-
def check_tsconfig():
|
|
33
|
-
"""Analyze tsconfig.json settings."""
|
|
34
|
-
print("\n⚙️ TSConfig Analysis:")
|
|
35
|
-
print("-" * 40)
|
|
36
|
-
|
|
37
|
-
tsconfig_path = Path("tsconfig.json")
|
|
38
|
-
if not tsconfig_path.exists():
|
|
39
|
-
print("⚠️ tsconfig.json not found")
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
try:
|
|
43
|
-
with open(tsconfig_path) as f:
|
|
44
|
-
config = json.load(f)
|
|
45
|
-
|
|
46
|
-
compiler_opts = config.get("compilerOptions", {})
|
|
47
|
-
|
|
48
|
-
# Check strict mode
|
|
49
|
-
if compiler_opts.get("strict"):
|
|
50
|
-
print("✅ Strict mode enabled")
|
|
51
|
-
else:
|
|
52
|
-
print("⚠️ Strict mode NOT enabled")
|
|
53
|
-
|
|
54
|
-
# Check important flags
|
|
55
|
-
flags = {
|
|
56
|
-
"noUncheckedIndexedAccess": "Unchecked index access protection",
|
|
57
|
-
"noImplicitOverride": "Implicit override protection",
|
|
58
|
-
"skipLibCheck": "Skip lib check (performance)",
|
|
59
|
-
"incremental": "Incremental compilation"
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
for flag, desc in flags.items():
|
|
63
|
-
status = "✅" if compiler_opts.get(flag) else "⚪"
|
|
64
|
-
print(f" {status} {desc}: {compiler_opts.get(flag, 'not set')}")
|
|
65
|
-
|
|
66
|
-
# Check module settings
|
|
67
|
-
print(f"\n Module: {compiler_opts.get('module', 'not set')}")
|
|
68
|
-
print(f" Module Resolution: {compiler_opts.get('moduleResolution', 'not set')}")
|
|
69
|
-
print(f" Target: {compiler_opts.get('target', 'not set')}")
|
|
70
|
-
|
|
71
|
-
except json.JSONDecodeError:
|
|
72
|
-
print("❌ Invalid JSON in tsconfig.json")
|
|
73
|
-
|
|
74
|
-
def check_tooling():
|
|
75
|
-
"""Detect TypeScript tooling ecosystem."""
|
|
76
|
-
print("\n🛠️ Tooling Detection:")
|
|
77
|
-
print("-" * 40)
|
|
78
|
-
|
|
79
|
-
pkg_path = Path("package.json")
|
|
80
|
-
if not pkg_path.exists():
|
|
81
|
-
print("⚠️ package.json not found")
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
try:
|
|
85
|
-
with open(pkg_path) as f:
|
|
86
|
-
pkg = json.load(f)
|
|
87
|
-
|
|
88
|
-
all_deps = {**pkg.get("dependencies", {}), **pkg.get("devDependencies", {})}
|
|
89
|
-
|
|
90
|
-
tools = {
|
|
91
|
-
"biome": "Biome (linter/formatter)",
|
|
92
|
-
"eslint": "ESLint",
|
|
93
|
-
"prettier": "Prettier",
|
|
94
|
-
"vitest": "Vitest (testing)",
|
|
95
|
-
"jest": "Jest (testing)",
|
|
96
|
-
"turborepo": "Turborepo (monorepo)",
|
|
97
|
-
"turbo": "Turbo (monorepo)",
|
|
98
|
-
"nx": "Nx (monorepo)",
|
|
99
|
-
"lerna": "Lerna (monorepo)"
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
for tool, desc in tools.items():
|
|
103
|
-
for dep in all_deps:
|
|
104
|
-
if tool in dep.lower():
|
|
105
|
-
print(f" ✅ {desc}")
|
|
106
|
-
break
|
|
107
|
-
|
|
108
|
-
except json.JSONDecodeError:
|
|
109
|
-
print("❌ Invalid JSON in package.json")
|
|
110
|
-
|
|
111
|
-
def check_monorepo():
|
|
112
|
-
"""Check for monorepo configuration."""
|
|
113
|
-
print("\n📦 Monorepo Check:")
|
|
114
|
-
print("-" * 40)
|
|
115
|
-
|
|
116
|
-
indicators = [
|
|
117
|
-
("pnpm-workspace.yaml", "PNPM Workspace"),
|
|
118
|
-
("lerna.json", "Lerna"),
|
|
119
|
-
("nx.json", "Nx"),
|
|
120
|
-
("turbo.json", "Turborepo")
|
|
121
|
-
]
|
|
122
|
-
|
|
123
|
-
found = False
|
|
124
|
-
for file, name in indicators:
|
|
125
|
-
if Path(file).exists():
|
|
126
|
-
print(f" ✅ {name} detected")
|
|
127
|
-
found = True
|
|
128
|
-
|
|
129
|
-
if not found:
|
|
130
|
-
print(" ⚪ No monorepo configuration detected")
|
|
131
|
-
|
|
132
|
-
def check_type_errors():
|
|
133
|
-
"""Run quick type check."""
|
|
134
|
-
print("\n🔍 Type Check:")
|
|
135
|
-
print("-" * 40)
|
|
136
|
-
|
|
137
|
-
result = run_cmd("npx tsc --noEmit 2>&1 | head -20")
|
|
138
|
-
if "error TS" in result:
|
|
139
|
-
errors = result.count("error TS")
|
|
140
|
-
print(f" ❌ {errors}+ type errors found")
|
|
141
|
-
print(result[:500])
|
|
142
|
-
else:
|
|
143
|
-
print(" ✅ No type errors")
|
|
144
|
-
|
|
145
|
-
def check_any_usage():
|
|
146
|
-
"""Check for any type usage."""
|
|
147
|
-
print("\n⚠️ 'any' Type Usage:")
|
|
148
|
-
print("-" * 40)
|
|
149
|
-
|
|
150
|
-
result = run_cmd("grep -r ': any' --include='*.ts' --include='*.tsx' src/ 2>/dev/null | wc -l")
|
|
151
|
-
count = result.strip()
|
|
152
|
-
if count and count != "0":
|
|
153
|
-
print(f" ⚠️ Found {count} occurrences of ': any'")
|
|
154
|
-
sample = run_cmd("grep -rn ': any' --include='*.ts' --include='*.tsx' src/ 2>/dev/null | head -5")
|
|
155
|
-
if sample:
|
|
156
|
-
print(sample)
|
|
157
|
-
else:
|
|
158
|
-
print(" ✅ No explicit 'any' types found")
|
|
159
|
-
|
|
160
|
-
def check_type_assertions():
|
|
161
|
-
"""Check for type assertions."""
|
|
162
|
-
print("\n⚠️ Type Assertions (as):")
|
|
163
|
-
print("-" * 40)
|
|
164
|
-
|
|
165
|
-
result = run_cmd("grep -r ' as ' --include='*.ts' --include='*.tsx' src/ 2>/dev/null | grep -v 'import' | wc -l")
|
|
166
|
-
count = result.strip()
|
|
167
|
-
if count and count != "0":
|
|
168
|
-
print(f" ⚠️ Found {count} type assertions")
|
|
169
|
-
else:
|
|
170
|
-
print(" ✅ No type assertions found")
|
|
171
|
-
|
|
172
|
-
def check_performance():
|
|
173
|
-
"""Check type checking performance."""
|
|
174
|
-
print("\n⏱️ Type Check Performance:")
|
|
175
|
-
print("-" * 40)
|
|
176
|
-
|
|
177
|
-
result = run_cmd("npx tsc --extendedDiagnostics --noEmit 2>&1 | grep -E 'Check time|Files:|Lines:|Nodes:'")
|
|
178
|
-
if result.strip():
|
|
179
|
-
for line in result.strip().split('\n'):
|
|
180
|
-
print(f" {line}")
|
|
181
|
-
else:
|
|
182
|
-
print(" ⚠️ Could not measure performance")
|
|
183
|
-
|
|
184
|
-
def main():
|
|
185
|
-
print("=" * 50)
|
|
186
|
-
print("🔍 TypeScript Project Diagnostic Report")
|
|
187
|
-
print("=" * 50)
|
|
188
|
-
|
|
189
|
-
check_versions()
|
|
190
|
-
check_tsconfig()
|
|
191
|
-
check_tooling()
|
|
192
|
-
check_monorepo()
|
|
193
|
-
check_any_usage()
|
|
194
|
-
check_type_assertions()
|
|
195
|
-
check_type_errors()
|
|
196
|
-
check_performance()
|
|
197
|
-
|
|
198
|
-
print("\n" + "=" * 50)
|
|
199
|
-
print("✅ Diagnostic Complete")
|
|
200
|
-
print("=" * 50)
|
|
201
|
-
|
|
202
|
-
if __name__ == "__main__":
|
|
203
|
-
main()
|