ChatGPT code-documentation skill for observed function behavior
Use supplied code and examples to describe purpose, parameters, returns, and edge conditions in the requested documentation style.
中文Install in ChatGPT
A ChatGPT workspace with skill creation enabled. The example uses only the supplied plain-text material.
- In a ChatGPT workspace with skill creation enabled, open Plugins → Skills → Create → Create with editor.
- Create a skill in the editor and adapt the text-only `code-documentation` workflow from the pinned GitHub source into its instructions.
- Save the skill, then type @ in a new chat to select it and try the example.
Example task
Manually select code-documentation. Use the fictional function contract and sample behavior below to write a Python docstring.
style preference `Google-style docstring`
function `tile_labels(rows)` returns every nonempty value in original order
actual sample `rows=["North", "", "West"]` | observed `result=["North", "West"]` | empty input gives `result=[]`What to check
Write a Google-style docstring for `tile_labels(rows)` and preserve nonempty values in the original order. Include `result=["North", "West"]` and note that empty input gives `result=[]`.
Original SKILL.md on GitHub · Updated
Frequently asked question
What if the source shows no exception behavior?
Document behavior verified by the supplied code or observations. Include an exception only if the supplied evidence establishes it.