A directory named agents passes plugin validate without opening the file
claude plugin validate printed Validation passed and exited 0. The directory it was given contained one file, and that file was not an agent. The same bytes, one directory higher, produced a line that named the file and a warning that the file had no front matter.
The difference is the path you pass. On Claude Code 2.1.308 the command help says it validates a plugin or marketplace manifest, or the skills, agents, and commands in a directory. A directory whose last component is the lowercase word agents takes a shorter path. The process reports success, the JSON contents array is empty, and the file is not opened. Pass the plugin root and the same file is listed as an agent.