From eladariel-pseudo-code-prompting-plugin
Converts natural language requirements into PROMPTCONVERTER-style pseudo-code through intelligent transformation and compression.
How this skill is triggered — by the user, by Claude, or both
Slash command
/eladariel-pseudo-code-prompting-plugin:prompt-structurerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Converts natural language requirements into PROMPTCONVERTER-style pseudo-code through intelligent transformation and compression.
Converts natural language requirements into PROMPTCONVERTER-style pseudo-code through intelligent transformation and compression.
Transforms vague requirements like "Add authentication to our API" into precise pseudo-code:
implement_authentication(
methods=["jwt", "oauth"],
providers=["google", "github"],
token_ttl="15m",
refresh_enabled=true,
rate_limiting="10/1h",
target_files=["src/auth/handler.ts", "src/middleware/auth.ts"],
error_handling={...},
security={...}
)
Key features:
If requirement is >1000 characters:
Example:
BEFORE (1200 chars):
"We need to add user authentication to our API. Users should be able to log in with
their email and password. We also want to support OAuth authentication with Google.
Users should have access tokens that expire after 15 minutes. Refresh tokens should
be used to get new access tokens. We need to implement rate limiting to prevent
brute force attacks. The rate limit should be 10 login attempts per hour per IP..."
AFTER (300 chars):
"User authentication: email/password + OAuth Google. Access tokens (JWT, 15m TTL).
Refresh tokens for renewal. Rate limit: 10 login attempts/hour/IP. Logout after 24h inactivity."
Extract technical parameters from requirement:
Convert to function format:
Name formula: [verb]_[subject]
Examples:
implement_oauth_authenticationimplement_payment_processingimplement_api_cachingvalidate_user_inputParameter structure:
function_name(
# Core parameters (explicit, typed)
param1="specific_value",
param2=["list", "of", "values"],
# Nested objects (when complexity requires)
complex_param={
"nested_key": "value",
"another": 123
},
# Standard production parameters (always included)
target_files=["path/to/file.ts"],
error_handling={...},
security={...},
timeout="5s",
logging=true
)
Include target_files based on detected tech stack.
Node.js/Next.js:
target_files=[
"src/app/api/[resource]/route.ts",
"src/lib/services/[service].ts",
"src/middleware/[middleware].ts"
]
Python/Django:
target_files=[
"app/views.py",
"app/models.py",
"app/middleware.py",
"app/forms.py"
]
Go:
target_files=[
"internal/handlers/[handler].go",
"internal/services/[service].go",
"pkg/middleware/[middleware].go"
]
Rust:
target_files=[
"src/handlers/mod.rs",
"src/services/mod.rs",
"src/middleware/mod.rs"
]
Every pseudo-code includes these production-ready parameters:
error_handling={
"invalid_input": 400,
"unauthorized": 401,
"forbidden": 403,
"not_found": 404,
"conflict": 409,
"rate_limited": 429,
"server_error": 500,
"service_unavailable": 503
}
security={
"validate_input": true,
"validate_authorization": true,
"encrypt_sensitive_data": true,
"use_secure_cookies": true,
"enforce_https": true,
"rate_limiting_enabled": true,
"use_pkce": true, # if OAuth
"secure_cookie_settings": {
"http_only": true,
"same_site": "strict",
"secure": true
}
}
timeout="5s" # Prevents hanging indefinitely
retry={
"max_attempts": 3,
"backoff": "exponential",
"jitter": true
}
cache={
"ttl": "5m",
"key_strategy": "resource_id",
"invalidation": "on_update"
}
logging=true # All operations logged
INPUT:
Add OAuth authentication with Google and GitHub. Support JWT tokens with 15-minute
access token TTL and 7-day refresh token TTL. Rate limit login to 10 attempts per hour.
Auto-logout users after 24 hours of inactivity.
OUTPUT:
implement_oauth_authentication(
providers=["google", "github"],
token_type="jwt",
access_token_ttl="15m",
refresh_token_ttl="7d",
session_timeout="24h",
rate_limiting={
"login_attempts": "10/1h",
"token_refresh": "30/1h"
},
target_files=["src/auth/oauth.ts", "src/auth/strategies/", "src/middlewares/auth.ts"],
error_handling={
"invalid_provider": 400,
"invalid_code": 400,
"token_expired": 401,
"invalid_refresh_token": 401,
"insufficient_scope": 403,
"rate_limit_exceeded": 429
},
security={
"validate_redirect_uri": true,
"use_pkce": true,
"secure_cookie": true,
"http_only": true,
"same_site": "strict"
},
validation={
"validate_email_format": true,
"validate_provider_response": true,
"validate_state_parameter": true
},
logging={
"log_login_attempts": true,
"log_token_operations": true,
"log_errors": true
},
timeout="5s",
retry={"max_attempts": 3, "backoff": "exponential"},
cache={"ttl": "5m", "key": "oauth_state"}
)
INPUT:
Implement rate limiting for our public API. Should limit to 1000 requests per hour
per user. Return 429 status when exceeded. Use sliding window algorithm.
OUTPUT:
implement_api_rate_limiting(
algorithm="sliding_window",
request_limit={
"per_user": 1000,
"time_window": "1h"
},
enforcement="per_user_id",
target_files=["src/middleware/rateLimiter.ts", "src/services/rateLimitStore.ts"],
error_handling={
"rate_limit_exceeded": 429,
"invalid_api_key": 401,
"malformed_request": 400
},
security={
"validate_api_key": true,
"validate_user_identity": true
},
storage={
"type": "redis",
"ttl": "1h"
},
logging={
"log_limit_exceeded": true,
"log_suspicious_patterns": true
},
timeout="100ms",
cache={"ttl": "30s"}
)
Be specific: Replace vague terms with concrete values
Include constraints: Numbers, timeouts, limits
Name operations clearly: Verb + subject
Specify error scenarios: Not just "handle errors"
Think about data flow: Where does it come from? Where does it go?
requirement-validator/ - Validation patterns/pseudo-code:transform command - User-facing transformation/pseudo-code:validate command - Validation across 6 dimensionsGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
npx claudepluginhub joshuarweaver/cascade-code-general-misc-4 --plugin eladariel-pseudo-code-prompting-plugin