ChatGPT code-explanation skill for function behavior and time cost
Use supplied code to explain inputs, outputs, operations, and design. Check runtime complexity and edge behavior separately.
中文Install in ChatGPT
A ChatGPT workspace with skill creation enabled. Verify the scenario using supplied plain text in chat.
- 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-explanation` 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-explanation and explain this fictional filter to a teammate. Cover the output order and how time changes with input size.
snippet from fictional sign registry
`def visible_names(rows): return [r.name for r in rows if r.visible]`
example records `Fern:visible`, `Oak:hidden`, `Ash:visible`
constraint preserve input orderWhat to check
Explain that `Oak:hidden` is skipped and `Fern:visible` and `Ash:visible` keep their order, giving `result=[Fern, Ash]`. A single pass has `O(n)` time.
Original SKILL.md on GitHub · Updated
Frequently asked question
When should I state complexity assumptions?
Identify the input size and assumptions about property access and output handling.