Vibe coding and the exciting future of hyper personal Obsidian plugins

This is another post about AI. Sorry, not sorry.

There’s a recent trend of what people are calling “vibe coding”, where non programmers are having AI write code for them. People are using it to make all sorts of little pieces of micro-software that help them in their life, from websites, to full on games.

Is it just me, or is Obsidian perfect for this? Imagine a future alongside blockbuster plugins like dataview and omnisearch, people use AI design their own plugins specifically for their vault. Even non coders. Ridiculously, gratuitously personalized. They don’t need to be sharable, but someone else could just have AI build their own?

Has anyone tried such a thing? I’m not exactly the ideal use case because I’m a pretty competent Python programmer, though I believe that Obsidian plugins are written in TypeScript / JS, neither of which I know, so I guess I kind of count.

What do we think?

2 Likes

I support that kind of coding as long it has some learning curve. Which, in a lot of cases, doesn’t have it.

You mentioned you’re a Python programmer, educated or self-learned; it doesn’t matter. You’re a programmer. A programmer has mileage for building an application, service, or function. Know the structure and all small details, like commenting code and documenting it (for more significant projects).

So, when “you” decide to create a plugin (sorry, if you already have it :smile:) … “I” will not be afraid to maintain it for “next generation of Obsidian users” once Obsidian users are over your head :wink:

But things that scare me are that there are / will be plenty of plugins, which will not be able to maintain as they are / will be created via “vibe coding”.

Vibe coding is an AI-dependent programming technique where a person describes a problem in a few sentences as a prompt to a large language model (LLM) tuned …

I admit that I become lazy at commenting code, so I (if it’s not sensitive!) drop it in ChatGPT, and in most cases, I barely change anything :joy:

It’s a good topic; I hope it gets somewhere!

Cheers, Marko :nerd_face:

4 Likes

I’m in the same boat as @EvolvingRichie regarding AI [vibe coding] with Obsidian, this is a great learning space for anyone getting started and wanting to learn how to code. Sure @DiCaver for maintainability its horrible completely agree, do a plugin/coding in Obsidian can’t be thousands of files [in most cases] so having to rework something isn’t the end of the world in my viewpoint. We have here a space where people can get introduce to coding in a relatively safe space, and if AI is your starting point so be it. Another parallel is in hacking you usually start off being a script kitty and you build your knowledge based cuz your script isn’t working and you learn along the way.

People saying you have to learn programming language/guidelines before you start coding. The act of doing is where it will stick within your mind and have much more success/learning by trying.

Whoever started something [anything in life] and was perfect at it. Nobody ever, you learn, you suceed and you fail so many time more, but that’s the whole point of doing something, you will learn much more from your failures than your success [a byproduct of doing]. So start embracing the journey :love_you_gesture:.

Here an example of what I was about to achieve using Datacore. Using pure code vibes :

Is the code pretty hahahha that’s for you to figure out, does it work? Si si, and the next version will be even better. We need better frameworks/workflows to better utilize AI tools, and there will be a massive growth in this space in the coming years.

So be creative, be adventurous and learn everyday.

We"ll be around… :saluting_face:
b.

I see a lot of people using it to generate CSS snippets especially. I know there are others developing personalized plug-ins as well.

I like the idea of using it for personal management projects or workflow improvements a ton more than the amount of projects I’m seeing published out to the public and I see a really cool space for AI to exist as homework helpers in a programming environment trained to provide code as well as coach and help train the user - Obsidian would be a great environment to have a coaching tool active in and to develop tools for since the platform’s working logic easily transfers to other tools.

It would be really cool to look at use cases in Obsidian with solutions that have a project that has to be built/customized for it and see if there are any ways to build out a few resources with an AI that could be available for a user to build out tools from the repetoire from scratch.

And I know you don’t need to pretrain a model to code something for Obsidian but my big anxiety about the current wild west is people who aren’t trained deploying products without doing due dilligence on testing these tools for security/stability/potential legal compliance issues/etc. - not because I believe they are acting maliciously necessarily, but because they don’t know what they are looking for and assume the market will do it for them. Being able to stage an AI that has their responses calibrated and is encouraged to follow best practices would benefit users working with AI who are developing a skillset.

My experience so far has been that coding with AI is an incredibly frustrating process. I haven’t spent any sincere amount of time to create a workflow to do so or done a lot of research it has purely been off the cuff queries to a few different AI to see what would happen. What I’ve received amounted to a similar amount of work to how I initially learned how to code: wanted to do X, took code from program Y that did similar task and played around in the guts until I understood what broke what thing. With AI I go over project and then have to wiggle the AI’s output around and figure out how to get it working from a broken state which honestly is more difficult.

1 Like

Obsidian is perfect for this. Which is why I’d never try another software (and maybe learn Lua or anything else).

Over time, some of the Javascript, CSS styling etc. start to rub on you and broaden your horizons to ask for stuff to be written that would not have crossed your mind before.
Also, Claude.ai (and probably to a lesser extent ChatGPT?) has a fair amount of knowledge of Obsidian API by 2025 and it seems I no longer need to hunt for pieces of API code from the forum to have AI build around it; it’s just there.

Otherwise it’s still a good idea to go to GitHub pages of plugins and show the .ts files to AI (be it Cursor Editor or good old VS Code Editor which latter comes with a generous free tier) to get some of the code necessary for your plugins or scripts.

Sometimes it takes something like 5-10 mins (2,3?) to have a new script (like yesterday, a draggable pop-up modal for current file’s git commit history with red and green lines showing BEFORE and AFTER) written that works straight away and the customization is 10-30 mins more until you think this is the end of it.

  • Need a good prompt of course, show other files with bits of code, etc. I was not doing this for the first time!

As I wrote elsewhere I no longer use Templater for scripts, only CodeScript Toolkit, which lets me make modals in .ts.

I do not wish to make full-blown plugins of my own for 300-500 lines of code with CONFIG available on the top of my scripts (to change repos, folders, etc.) as I already have 100 plugins in the vaults, half of which enabled.
When I share my code, I usually state they are machine-made. It’s good to show it to other AI and customize it. So takers don’t need to use it as they are.

Looking at state of the forum in the last year or so, I suspect most Obsidian users are pretty hard at it, talking to AI and getting solutions from it. I can’t believe they ditched Obsidian or migrated to Mars.

2 Likes

AI is incredibly helpful when used as a tool out of many for software development. Audit, review, refactoring, chore, documentation, prototyping, comparison, testing… endless possibilities.

Yet, at the same time, when left unchecked or used without proper knowledge, it is incredibly dangerous.

Why? Just as humans, AI makes mistakes. Royal messups at times, just as bad as human devs brainfarts. However, it is often different kinds of mistakes, which if done right can be leveraged in a great way:

  • :robot: An AI might find bugs in your decades old code in seconds while you have gone over it hundreds of times without realizing. Often, because another bug was hiding it from you.
  • :technologist: At the same an experienced developer will often look at an AI generated code snippet and, within seconds, will be able to tell that it should not / cannot or must not be used that way for some reason.

When the Obsidian Team decided to implement auto-approval for community plugins, they pulled the stop and I fear this might even break the community in two ways.

Why? Because they implemented a workflow that only works for “conventional” coding and allowed it to be (ab)used by vibe coding.

  • :white_check_mark: For a conventinal plugin (coded by a seasoned dev) this new workflow is amazing. It helps the devs with fixing low hanging fruits and adhere to conventions (or - if they don’t care - the score card indicates that to the user)
  • :cross_mark: For a vibe-coded plugin (code generated by AI) this new workflow falls flat. If I had to compare, it is like a dev would be allowed to review and approve their own plugin.

I said it might break in two ways:

  1. :broken_heart: conventional plugins cannot compete with this.
    • They already have a hard time competing with the speed of vibe-coding while maintaining stability / maturity. Now, that workflow puts even more pressure by handing free passes to thousands of low quality solutions.
    • Watching core members / contributors of this community struggle to keep up or find the motivation to do so is disheartening to see.
  2. :skull: it makes using plugins for users as dangerous as never before.
    • You have plugins out there that destroy user’s notes or vaults and nobody has ever even looked at the code.
    • I mean this quite literally. The code might be 100% auto-generated and the plugin auto-approved. Meaning, by the time the user downloads and uses the plugin, in an extreme case they might literally be the first human to use it.

This is not about “just always make backups” (which you should). Or “there is already a general warning when enabling plugins” (which is fine).

It is about what users are allowed to expect when installing plugins.

At the very least, in my opinion, there should be a policy enforced by Obsidian Staff requesting devs to disclose the usage of AI.

And if that scope means that the code itself is auto-generated, there should be a required label added to that plugin like “The code for this plugin is auto-generated. It will not / cannot be manually audited by the Obsidian Staff. Only use this if you understand the risks. Do not use in production. Disable Auto-Updating.”

This does not prevent devs from publishing vibe-coded plugins as conventional (might even just be ignorance or naivity with no ill intend), but having a policy in place would allow the Obsidian Team to immediately deal (ban / quarantine / whatever) with it on a low effort basis, which - I am convinced - is necessary to keep the plugin environment healthy / working.

I’ll give you an example of a plugin that should not exist to illustrate the problem. I was involved in dealing with the data loss so it’s an example I verified myself.

  • :cross_mark: I am, however, not interested in pointing it out just for a resolution of “oh, let’s just ban it”. That does not solve the root problem.
  • :light_bulb: I’m interested to hear if the Obsidian Team acknowleges this as a problem or if this is how the plugin repo is supposed to work.
  • :light_bulb: And I am interested to hear if I missed any efforts within the community to tackle this on their own. Like currated lists without outdated/broken versions or lists with tested/acknowledged vibe-coded plugins or something like that.

Example:

Problem:

  • The plugin always passes the auto-approval
  • On usage, it unintentionally deleted data from your notes
  • On usage, it unintentionally changed your frontmatter style
  • The repository does not mention any usage of AI.
  • When asked, the repo owner confirmed in an issue that:
    • The whole repository is maintained by AI
    • The whole code is written by AI and has never been touched by the “dev”
    • The repo owner is convinced that the community or plugin users do not have any legitimate interest in being made aware of any of that.

So while it is correct, that the repo owner can do as it pleases them (unless they are violating GitHubs terms and conditions or others legal rights), I think the community (both, devs and plugin users) is in desparate need of measures to safeguard itself from being exposed / harmed in that way (be it either by wasting time on contributing or loosing data or similar).

This is not a rant. You are invited to point out any flaws.

I genuinely try to contribute to improve the current state of the plugin repo.

I maintain a quite large Obsidian plugin, so my perspective on this is somewhere in the middle. If you just vibe code a tool for yourself, then sure, go ahead. But I want to answer the worry that “nobody looked at the code” with something more practical than just an opinion.

The bugs that really hurt are not the syntax errors made by an AI model. You will find those in five minutes. The bugs that cost me weeks of work always looked like perfectly working code. For example:

  • One of the source files in my repo had some hidden NUL bytes in it. Git treats files with a NUL in the first 8 KB as binary, so git diff showed completely nothing. Because of this, every change I made in that file was invisible during code reviews for months.
  • My archive feature and restore feature were both working correctly on their own. But used together, they allowed users to bypass a limit. You could archive an item, then restore it, and the limit check never triggered on the way back.
  • I had a sync warning telling users that 15 items failed. They didn’t really fail. The code skipped them on purpose, but still counted them as failures. Users could never clear this warning because nothing was actually broken.

You cannot catch things like this just by reading a code diff. They only show up months later, on other people’s data, in strange combinations nobody predicted. This is the real gap between a personal script and a tool you give to strangers, and just reviewing the code once will not fix it.

But there is also another side to this. You can hook up the AI to Playwright or another browser tool, and it will test the product by itself based on your rules. It can click around, take screenshots, and verify if the app behaves exactly how you need it to.

Interesting topic, but I believe that

Vibe coding is an AI-dependent programming technique where a person describes a problem in a few sentences as a prompt to a large language model (LLM) tuned …

oversimplifies what’s happening. I read that and I think, “If only I could get something valuable created out of describing a problem in a few sentences!”