r/Python • • 11d ago

Discussion Do Python-specific skills actually improve the agentic coding?

Hey folks! I’ve been playing with agentic coding and wondering if it’s actually worth adding Python-specific skills to my setup.

For those of you using them: which ones are genuinely useful? Any examples where a Python-specific skill noticeably improved the result vs just letting the agent figure things out on its own?

0 Upvotes

27 comments sorted by

33

u/No_Departure_1878 11d ago

The single most important thing with agentic coding is code readability. You need to be able to keep the large amounts of software that you get under your control. You do not want to be left with 100K LOC that you do not understand. For that you need skills that will force the agents to write very readable code, so that you can go through it, reviewing it, as fast as it comes out of the LLM.

Those stills are for sure going to be language dependent.

2

u/Ashamed-Calendar-139 10d ago

When you say skills should force readable code, what do the actual rules look like for you? Things like max function length, naming, structure, type hints? Curious how much of it is Python-specific vs. general.

6

u/No_Departure_1878 10d ago

Yeah, of course to all of it. You need type hints, that's python specific and that's just one example. It makes no sense to have a single skills file for every language. I do not understand how you cannot see that, it should be obvious.

8

u/BakkerJoop 11d ago

Don't need Python skills for that

4

u/Ashamed-Calendar-139 11d ago

thanks! tell me why)

5

u/BakkerJoop 11d ago

The logical mind to be able to actually write any program imo is enough. Just a simple understanding of how a computer works. Don't need special language skills for that

2

u/this_is_life_now 11d ago

I'm not even sure what I'd put into a skill. What practices in python would you expect the agent to follow, that it doesn't inherently do already?

1

u/Ashamed-Calendar-139 10d ago

Maybe a more useful way to look at it: where does the agent most oftn go wrong or waste time/tokens on Python project.

6

u/jmacey 11d ago

I use more software engineering type skills. For example

  • Always use a git worktree
  • Never work on the main branch or do anything unless branch is commited
  • Follow PEP8 (which it usually does anyway)
  • Always add type hints and docs strings (which it generally doesn't)

My main process is to alway use a TDD approach to generating new code and I will typically review the tests before letting it write the code.

1

u/turbothy It works on my machine 4d ago

Those aren't skills, they're instructions.

1

u/jmacey 4d ago

This is the part of the skill I wrote for my default dev environment. There is quite a lot more but these are the headlines.

3

u/Legal-Pop-1330 5d ago

An oft overlooked aspect is the awesome power of ruff/typecheckers too.

Forcing strongly typed code automatically results in better designs in my experience.
A key problem remains no "perfect" type-checker, though I think ty will get there.

We use https://pypi.org/project/codedoctor/ to setup a repo consistently. It also has an AST parser to enforce additional failure modes of agents.

2

u/andy4015 11d ago

Using GitHub copilot recently I noticed that it automatically picked up and used a python skill. I guess it just has one available and imagine it is far better than one I could craft.

The one caveat being if there is a specific way of doing something that you've found works then I would write a skill for that. For instance I have some libraries that I've developed that I include in a skill and offer some examples of how to use it and declare that it should prefer to use them where applicable.

2

u/quiet_stacktrace 11d ago

i'd test it with a few representative tasks both with and without the skill and compare test pass rate plus how much review or rework each output needs. project-specific constraints like the supported Python version, test/lint commands, and library conventions seem more useful than a generic 'write good Python' skill.

2

u/digihmong 10d ago

I make them generic, but it would be worth it. Most agents are trained with python code so they'll read and write python the fastest and be the most token efficient about it. Use frameworks such as fastAPI and SQLmodel as guardrails. There's a caveat to this, sometimes you'll want to use Rust/Go/C++ or Elixir/Erlang depending on the task. I pretty much build everything in python now. I've got a skill bank I'll publish soon. Did some benchmark testing and the results were very good. I tested with muse and DeepSeek so I still need to get Claude in there.

2

u/sinoziqi 9d ago

Long "write idiomatic Python" style guides barely help, whereas tiny, strict repo-invariant checklists make a noticeable difference — especially when they ban concrete footguns rather than restating Python syntax.

What actually catches bugs in multi-file edits is keeping a short (<50 lines) rule list paired with a fast test command: for example pinning stdlib-only vs allowed deps, forbidding shell=True in subprocess.run, requiring atomic temp-file + os.replace for state files, and always running python3 -m unittest or pytest after the final edit.

2

u/NadiaReadsChunks 8d ago

Skills that pin down your test runner, type checker and package manager config help most. Without them the agent guesses pip vs poetry vs uv every session. Beyond that I haven't seen much difference, it still hallucinates APIs on anything niche. idk man.

2

u/heikkitoivonen 4d ago

I haven't felt the need to use any generic Python skills yet, but I think there are specific situations where skills would make sense. For example, if I had to work a lot with SQLAlchemy, I would probably install a skill for that. Also anything specific to your project or personal preferences could be a useful skill.

Another area I could think of would be performance optimization. I built the documentation site for Python Big-O time and space complexity for humans first. While I was working on it I noticed that agents actually had lots of wrong assumptions about the builtin and stdlib performance; the more obscure parts having more issues.

I made the site into a skill for agents as well, and run simple evals to verify that the skill helped agents get the facts right. What I have not yet tried is to see if it would help improve performance in real life projects. If you have a perf problem, I would be interested in hearing if the skill helped in optimization.

2

u/hstarnaud 4d ago

Yes skills will improve agents a lot, you should provide skills which are specific to your project and your set up rather than generic python skills.

2

u/mrbartuss 4d ago

Definitely won't hurt you

1

u/DEE_PIZZLE 20h ago

Python skills help with testing and dependency management. Rapidfort can also help secure python app containers by removing unnecessary components and reducing vulnerabilities.