coding.fix_param_use
Fix call sites to pass positional/keyword args and name constants correctly
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-02
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- model
- haiku
- description
- Fix call sites to pass positional/keyword args and name constants correctly
03 SKILL.md 正文
Goal
I will pass you a file <FILE>. In that file, make sure that:
- Callers pass required parameters by position and optional parameters by keyword
- Constants are assigned to an intermediate variable with the same name as the corresponding formal parameter
Conventions
- Follow
## Call Functions with Position Arguments for Required, Keywords for Optionalin.claude/skills/coding.rules.md
Examples
-
For a function with the signature
def apply_llm_prompt_to_df( prompt: str, df: pd.DataFrame, extractor: Callable[[Union[str, pd.Series]], str], target_col: str, batch_mode: str, *, model: str, batch_size: int = 50, dump_every_batch: str = "", tag: str = "Processing", testing_functor: Optional[Callable[[str], str]] = None, use_sys_stderr: bool = False, ) -> Tuple[pd.DataFrame, Dict[str, int]]: -
Bad (required parameters passed by keyword, constant not named)
df, stats = hllmcli.apply_llm_prompt_to_df( prompt=prompt, df=df, extractor=extract_person_industry_from_df, target_col="industry", batch_mode=batch_mode, batch_size=batch_size, model=model, tag=tag, ) -
Good (required parameters positional, optional parameters by keyword, constant named)
target_col = "industry" df, stats = hllmcli.apply_llm_prompt_to_df( prompt, df, extract_person_industry_from_df, target_col, batch_mode, batch_size=batch_size, model=model, tag=tag, )
Verification
- [ ] Confirm required parameters are passed positionally and optional parameters by keyword
- [ ] Confirm constants used at call sites are assigned to named intermediate variables
- [ ] Run the file's unit tests to confirm behavior is unchanged
04 同仓库更多 Skills
tutorial_in_60_mins.propagate_docker_changes
Sync tutorial and class-project Docker files to match project_template
tutorial_in_60_mins.merge_markdown
Merge the content of a markdown file into a Jupyter notebook
tutorial_in_60_mins.format
Format a directory to follow the "Learn X in 60 Minutes" tutorial conventions
tutorial_in_60_mins.create
Create a tutorial directory for the Learn X in 60 Minutes conventions
todo.reorg_in_progress
Reorganize ai_task_queue.md so in-progress tasks, not-started tasks, and mislabeled topic headers sit under the right H1 stage
todo.reorg_headers
Reorganize ai_task_queue.md .md so every H2 topic matches ALL TOPICS and every H3 task sits under the right topic, keeping its H1 stage