format-params
/format-params
Apply consistent method parameter line break formatting across C# projects. Formats parameter lists in declarations (methods, constructors, local functions, delegates) while leaving invocations untouched. Use when the user wants to format method parameters or apply parameter line break formatting.
- Author
- atc-net ↗
- Repository
- atc-agentic-toolkit ↗
- Licence
- MIT
- Last repository change
- 27.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Apply consistent method parameter line break formatting across C# projects. Formats parameter lists in declarations (methods, constructors, local functions, delegates) while leaving invocations untouched. Use when the user wants to format method parameters or apply parameter line break formatting.
Original author description
Apply consistent method parameter line break formatting across C# projects. Formats parameter lists in declarations (methods, constructors, local functions, delegates) while leaving invocations untouched. Use when the user wants to format method parameters or apply parameter line break formatting.
How it works
- Scope: What to Format
- Formatting Rules
- Examples
- Execution Instructions
- Guidelines
SKILL.md preview
---
name: format-params
description: Apply consistent method parameter line break formatting across C# projects. Formats parameter lists in declarations (methods, constructors, local functions, delegates) while leaving invocations untouched. Use when the user wants to format method parameters or apply parameter line break formatting.
disable-model-invocation: true
---
# Format Method Parameters
## Scope: What to Format
**ALL projects:**
All *.cs files EXCEPT auto-generated code.
Exclude files with:
- "generated", ".g.cs", ".designer.cs" in filename
- AssemblyInfo.cs files
- `[GeneratedCode]` or `[GeneratedCodeAttribute]`
- `<auto-generated>` tags
- "auto-generated" in headers
- "This code was generated by a tool"
**ONLY format parameter lists in DECLARATIONS:**
- Method declarations (public, private, protected, internal, static, async, virtual, override, abstract, etc.)
- Constructor declarations
- Local function declarations (functions defined inside methods)
- Delegate declarations
**DO NOT format parameter lists in INVOCATIONS or EXPRESSIONS:**
- Method calls/invocations (e.g., `.Replace(...)`, `.Substring(...)`)
- Constructor invocations (e.g., `new MyClass(...)`)
- Ternary operators (e.g., `condition ? value1 : value2`)
- Lambda expressions (e.g., `(x, y) => x + y`)
- LINQ query expressions
- Indexer property declarations (e.g., `this[int x, int y]`)
## Formatting Rules
### Rule 1: Multiple Parameters
Break down **all parameters** if a method has **more than 1 parameter**, with each parameter on its own line.
### Rule 2: Single Long Parameter
Break down a **single parameter** if the total line length (including indentation) exceeds **80 characters**.
## Examples
### Declarations to Format
```csharp
// No parameters - no break
public void MyMethod1()
// Single short parameter - no break
public void MyMethod2(int parameter1)
// Single parameter, total length > 80 chars - break
public void MyLooooooooooooooooooooooooooooooooooooooooooonMethod4(
int parameter1)
// 2 parameters - break all
public void MyMethod5(
int parameter1,
int parameter2)
// 3+ parameters - break all
public void MyMethod6(
int parameter1,
int parameter2,
int parameter3)
// Constructor with multiple parameters - break all
public MyClass(
string name,
int age,
bool isActive)
// Local function with multiple parameters - break all
void LocalFunction(
int param1,
string param2)
// Delegate with multiple parameters - break all
public delegate void MyEventHandler(
object sender,
EventArgs e);
```
### Invocations to Leave Unchanged
```csharp
// Method invocations - DO NOT format
var result = assembly.GetBeautifiedName().Replace("Api", "API", StringComparison.Ordinal);
var name = someObject.SomeMethod(arg1, arg2, arg3);
// Constructor invocations - DO NOT format
var obj = new MyClass(param1, param2, param3);
// Ternary operators - DO NOT format
return condition ? value1 : value2;
// Lambda expressions - DO NOT format
var filtered = items.Where((item, index) => item.IsActive && index > 0);
// Indexer declarations - DO NOT format
public string this[int row, int column]
```
## Execution Instructions
### 1. Scan for C# files
Find all `.cs` files in the repository.
### 2. Identify DECLARATIONS (not invocations)
**Method declarations:**
- Lines starting with access modifiers: `public`, `private`, `protected`, `internal`
- Lines with method modifiers: `static`, `virtual`, `override`, `abstract`, `async`, `sealed`
- Pattern: `[modifiers] [return-type] [method-name]([parameters])`
- Must have a return type (or `void`) before the method name
- Usually followed by `{`, `;`, or `=>`
**Constructor declarations:**
- Pattern: `[modifiers] [class-name]([parameters])`
- Class name matches the containing class
- No return type before the name
**Local function declarations:**
- Found inside method bodies
- Pattern: `[return-type] [function-name]([parameters])`
**Delegate declarations:**
- Pattern: `[modifiers] delegate [return-type] [delegate-name]([parameters]);`
- Contains the `delegate` keyword
**Key distinction from invocations:**
- Declarations have modifiers (public, private, static, etc.) OR are preceded by a type
- Invocations follow a `.` (member access), are on the right side of `=`, or are arguments to other methods
### 3. Apply formatting rules
For each declaration found:
- If 2+ parameters: break all parameters onto separate lines
- If 1 parameter: break only if total line length > 80 characters
- Ensure proper indentation (4 spaces per indentation level)
- Place opening parenthesis `(` on same line as method name
- Place each parameter on its own line with proper indentation
- Keep closing parenthesis `)` on same line as last parameter
### 4. Process in batches
Work on files in manageable batches (e.g., 10-20 files at a time).
### 5. Verify after each batch
Run `dotnet build` to ensure no syntax errors.
### 6. Track progress
Use todo list to track which files have been processed.
### 7. Final verification
Run full test suite after all changes complete.
## Guidelines
- **Preserve all code logic and comments**
- **Maintain existing indentation style** (spaces vs tabs)
- **Handle edge cases**: attributes, generic types, default values, nullable types, ref/out/in parameters
- **Do not modify method bodies** - only parameter declarations
- **Do not modify method invocations** - only declarations
- **Leave ternary operators unchanged**
- **Leave lambda expressions unchanged**
- **Leave LINQ expressions unchanged**
- **If uncertain whether something is a declaration or invocation**, skip it and flag for manual review
Versions
The database has no other skills named format-params.
Database snapshot: 13.11.2026 · package version 1304dcac0d43 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100sql-params-generate
Write the parameter file sql-quality needs for SQL files with :name placeholders, using values that exist in the database. Use when sql-quality skips files with UnboundParameter, or when asked to generate SQL parameters. - 100most-parameters
Find the functions/methods with the most parameters in a codebase, ranked by parameter count, using ast-grep structural matching. Use whenever the user wants to know which functions take too many arguments, asks "what has the most parameters / longest argument list", hunts for… - 100performance
Flutter performance rules — const constructors, RepaintBoundary placement, builder constructors for lists, image cache sizing, and keeping work out of build methods. Use this whenever implementing a list or grid, loading images, writing animations, investigating jank or dropped… - 100go-functional-options
Use when designing a Go constructor or factory with 3+ optional parameters, or an API expected to grow new options over time. Covers the canonical Option interface pattern with unexported apply method, With* constructors, default values, and the interface-vs-closure tradeoff.… - 100go-functional-options
Use when designing a Go constructor or factory with 3+ optional parameters, or an API expected to grow new options over time. Covers the canonical Option interface pattern with unexported apply method, With* constructors, default values, and the interface-vs-closure tradeoff.…