While practicing "Authoring skills" section in the Code Labs
Level 2: Asset Utilization (license-header-adder)
Below is the snippet to create file with license header:
Create a new file my_script.py with the following python code:
def hello():
print("Hello, World!")
When I tried the prompt with "GPT-OSS 120B (Medium)" as my Gemini model limit was exhausted, it didn't add the license text by default.
Below is the response for the query:
"If I use any other model will it invoke the skills automatically ?
How should I configure the skill to be invoked in my prompt?"
About automatic skill invocation
| Question |
Answer |
Will any other model automatically invoke the license-header-adder skill when a file is created? |
No. The skill is not tied to a specific LLM. Skills are explicitly invoked by the agent (i.e., by us). Changing the underlying model does not cause automatic execution of skills. |
| How to configure the skill to be invoked in a prompt? |
Include an explicit instruction in your prompt that calls the skill, e.g.:
\nWhen creating a new Python file, first run the `license-header-adder` skill to prepend the appropriate license header.\n
The agent will then follow the skill’s steps: read resources/HEADER_TEMPLATE.txt, convert it to # comments for Python, and prepend it to the new file’s contents. You can also create a small wrapper command or sub‑agent that always runs this skill after any write_to_file operation. |
If you’d like a more permanent automation (e.g., “every new .py file automatically gets the header”), let me know and I can set up a small helper sub‑agent or script that watches for file‑creation events and runs the license-header-adder skill automatically.
While practicing "Authoring skills" section in the Code Labs
Level 2: Asset Utilization (license-header-adder)
Below is the snippet to create file with license header:
Create a new file my_script.py with the following python code:
def hello():
print("Hello, World!")
When I tried the prompt with "GPT-OSS 120B (Medium)" as my Gemini model limit was exhausted, it didn't add the license text by default.
Below is the response for the query:
"If I use any other model will it invoke the skills automatically ?
How should I configure the skill to be invoked in my prompt?"
About automatic skill invocation
license-header-adderskill when a file is created?\nWhen creating a new Python file, first run the `license-header-adder` skill to prepend the appropriate license header.\nThe agent will then follow the skill’s steps: read
resources/HEADER_TEMPLATE.txt, convert it to#comments for Python, and prepend it to the new file’s contents. You can also create a small wrapper command or sub‑agent that always runs this skill after anywrite_to_fileoperation.If you’d like a more permanent automation (e.g., “every new
.pyfile automatically gets the header”), let me know and I can set up a small helper sub‑agent or script that watches for file‑creation events and runs thelicense-header-adderskill automatically.