kitchen-engineer42/pdf2skills/routine-parameter-design
Claude Code and agent skill by kitchen-engineer42/pdf2skills
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Design and optimize function/method parameter lists when defining or refactoring API interfaces, method signatures, or function parameters. Apply best practices for parameter count, ordering, pass mechanisms, and documentation to create clear, efficient, and maintainable interfaces.
Install
npx vskill@latest install kitchen-engineer42/pdf2skills/routine-parameter-designSKILL.md
Routine Parameter Design
Use this skill when defining new functions, refactoring existing method signatures, or designing API interfaces to ensure proper parameter design.
When to Use
- Defining or refactoring a function's parameter list
- Designing API interfaces or method signatures
- Reviewing code for parameter-related issues
- Optimizing function interfaces for clarity and maintainability
Core Design Principles
1. Limit Parameter Count
- Minimize the number of parameters to improve readability and usability
- Consider using parameter objects or structs when parameters exceed 3-5 items
- Each parameter should serve a distinct, necessary purpose
2. Order Parameters (Input-Modify-Output)
Arrange parameters in this specific sequence:
- Input parameters: Data the routine reads but does not modify
- Modify parameters: Data the routine both reads and modifies
- Output parameters: Data the routine writes but does not read
3. Choose Appropriate Pass Mechanisms
- Pass by value: For primitive types and small objects that won't be modified
- Pass by reference: For objects that need modification or to avoid copying overhead
- Objects: Typically passed as object references (not individual fields)
- Pointers: Follow the asterisk rule (use
*consistently for pointer parameters)
4. Ensure Interface Consistency
- Match actual parameters with formal parameter types
- Follow language-specific conventions (e.g., C library ordering when applicable)
- Maintain consistent ordering across related functions
- Use similar parameter names for similar purposes across the codebase
5. Apply Modifiers Appropriately
- Use
constprefix to prevent modification of input parameters - Use
inkeyword to explicitly mark input-only parameters - Use
outkeyword to explicitly mark output-only parameters - Consider
inoutor equivalent for parameters that are both read and modified
6. Document and Name Clearly
- Use descriptive, self-documenting parameter names
- Write clear comments explaining parameter purpose and constraints
- Document expected ranges, valid values, and edge cases
- Include units of measurement when applicable
7. Validate Parameter Usage
- Ensure the routine uses all passed parameters
- Remove unused parameters to avoid confusion
- If a parameter is temporarily unused, document why and when it will be used
8. Avoid Global Variables
- Never use global variables as substitutes for parameters
- Pass all required data explicitly through the parameter list
- Global variables make code harder to test, understand, and maintain
Language-Specific Considerations
- C/C++: Pay attention to pointer vs reference semantics, const correctness
- Java: All objects are passed by reference; primitives by value
- Visual Basic: Use
ByValandByRefkeywords explicitly - Always check language-specific syntax limitations and conventions
Review Checklist
- [ ] Parameter count is minimized and reasonable
- [ ] Parameters follow input-modify-output ordering
- [ ] Pass mechanism is appropriate for each parameter
- [ ] Modifiers (const, in, out) are used correctly
- [ ] All parameters have clear names and documentation
- [ ] All parameters are actually used by the routine
- [ ] No global variables are used as parameter substitutes
- [ ] Interface is consistent with related functions
Security
- Security scanPassed, 100 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 repositoryCheckingskills_samples/Steve McConnell Code Complete A Practical Handbook of Software Construction_output/routine-parameter-design/SKILL.md
Popularity
- 7-day trend score
- 0
Refreshed 18 Mar 2026, 7 months ago.
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/kitchen-engineer42/pdf2skills/routine-parameter-design)