Fix instructions
yof_fix_promptGenerates step-by-step fix instructions for a reported security finding, showing secrets only as a prefix plus REDACTED. Use it after yof_check or yof_findings flags a leaked key or fake package.
Instructions
Write step-by-step instructions to fix one finding, with any secret shown only as a short prefix plus REDACTED. Use it after yof_check, yof_check_diff or yof_findings reports a finding; use yof_explain for background on a rule, and yof_verify once the fix is made. For a key rule pass file (and line), which yof reads locally to find the value; for a package rule pass package. A finding_id, or a rule this computer does not know, is sent to yof.io and needs YOF_API_KEY. Returns rule and instructions, plus file, line and still_in_file for a key finding.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"rule_id": "<rule_id>"
},
"name": "yof_fix_prompt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | The file the finding is in, relative to the project root. Required for key rules (secret.*). | |
| line | No | The line of the finding, to pick one match when the file has several. Optional. | |
| package | No | The package name. Required for package rules (package.*). | |
| rule_id | Yes | The rule id of the finding, for example secret.openai or package.lookalike. | |
| finding_id | No | A finding id from yof_findings. When set, the instructions come from yof.io and the other fields are ignored. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | The file (key findings). | |
| line | No | The line found in the file, or the line passed in. | |
| rule | Yes | The rule id. | |
| package | No | The package (package findings). | |
| finding_id | No | The yof.io finding id, when one was passed. | |
| instructions | Yes | The fix instructions, ready to follow. | |
| still_in_file | No | Whether the value is still in the file (key findings). |