From samocode
Test the specific feature/fix implemented in the current session using browser or API tools.
npx claudepluginhub yuvasee/samocodeThis skill uses the workspace's default tool permissions.
Tests the specific feature or bug fix implemented in the current session. NOT full E2E testing - focused on the session's work.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Tests the specific feature or bug fix implemented in the current session. NOT full E2E testing - focused on the session's work.
Read session context:
_overview.md to understand what was implementedDetermine test strategy:
Select browser testing tool (if frontend testing needed):
Choose the most suitable tool for your needs:
| Tool | Best For | Setup |
|---|---|---|
| chrome-devtools MCP | Quick inspection, console access | Add to .mcp.json |
| Puppeteer | Scripted browser automation | npx puppeteer |
| Playwright | Cross-browser testing, screenshots | npx playwright |
Recommendation:
If adding MCP: After modifying .mcp.json, signal continue to restart the agent process (MCP doesn't hot-reload).
Start the application:
.samocode file or README for startup instructionsExecute feature tests:
Browser testing:
API testing:
# Example: Test endpoint
curl -X POST http://localhost:8000/api/endpoint \
-H "Content-Type: application/json" \
-d '{"test": "data"}'
Smoke test (side effect):
Document results:
Create [SESSION_PATH]/[TIMESTAMP_FILE]-test-[feature-slug].md:
# Test: [feature name]
Date: [TIMESTAMP_LOG]
## What Was Tested
[Brief description of implemented feature]
## Test Environment
- Working Dir: [path]
- App Status: [running/failed to start]
- Testing Tools: [chrome-devtools/puppeteer/playwright/curl]
## Test Steps
1. [Step and result]
2. [Step and result]
...
## Results
- Feature Test: [PASS/FAIL]
- Smoke Test: [PASS/FAIL]
## Issues Found
[None or list of issues]
Update session:
_overview.md:
- [TIMESTAMP_ITERATION] Feature tested: [result] -> [filename].md- [filename].md - Test reportcd [SESSION_DIR] && git add . && git commit -m "Test: [feature]"Signal result:
continue, recommend quality phaseblocked with failure details (don't auto-fix)Add to .mcp.json:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["chrome-devtools-mcp@latest", "--headless=true"]
}
}
}
Then signal continue to restart with new MCP.
# Quick test script
npx puppeteer <<'EOF'
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({ headless: true });
const page = await browser.newPage();
await page.goto('http://localhost:3000');
// ... test steps
await browser.close();
})();
EOF
# Quick test
npx playwright test --headed=false
# Or inline script
npx playwright <<'EOF'
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('http://localhost:3000');
await page.screenshot({ path: 'test.png' });
await browser.close();
})();
EOF
_overview.md -> Check project .samocode file for MAIN_REPO, or ask user