This is a quote from Peirce’s Laws of Nature (EP2, 68), in which he, after having characterized inductions as ‘subjective generalizations’ writes that:
Such a generalization, a mere fabrication of ingenuity, which I term a subjective generalization, is often proposed by an amateur in science as an induction. […] Let the artificers of such false inductions dare to set up predictions upon them, and the first blast of nature’s verity will bring them down, houses of cards that they are. So then, I do not think a better definition of a law of nature can be given than this: it is a prognostic generalization of observations.
In essence, what Peirce is saying is that laws of nature are habits of action, the purpose of which is to produce some sensible results (not necessarily sensible only to us humans I would like to add), as he makes clear in How to Make Our Ideas Clear (EP1, 131). Here Peirce is saying that a habit is distinguishable from other habits not only by what sensible results (action) it has produced but by how it would possibly cause us to act, no matter how improbable we might think that possibility is:
From all these sophisms we shall be perfectly safe so long as we reflect that the whole function of thought is to produce habits of action; and that whatever there is connected with a thought, but irrelevant to its purpose, is an accretion to it, but no part of it. If there be a unity among our sensations which has no reference to how we shall act on a given occasion, as when we listen to a piece of music, why we do not call that thinking. To develop its meaning, we have, therefore, simply to determine what habits it produces, for what a thing means is simply what habits it involves. Now, the identity of a habit depends on how it might lead us to act, not merely under such circumstances as are likely to arise, but under such as might possibly occur, no matter how improbable they may be. What the habit is depends on when and how it causes us to act. As for the when, every stimulus to action is derived from perception; as for the how, every purpose of action is to produce some sensible result. Thus, we come down to what is tangible and practical, as the root of every real distinction of thought, no matter how subtle it may be; and there is no distinction of meaning so fine as to consist in anything but a possible difference of practice.
Whenever reading Peirce, it should be kept in mind that his philosophy is fundamentally based on such openness and anti-essentialism (or rather anti-foundationalism). This does not mean that there is nothing to tie together our particular observations. The predictive power of any habit, their esse in futuro, is what produces generalities. But just like thought (a form of action in itself) that is connected to a brain (which is a more particular kind of habit of action) is subject to change by becoming into relation with novel habits, the laws of nature are not unchanging either. Just because our experiences of the laws of nature warrant an idea of permanence, it does not mean that what we experience as unchanging couldn’t come down like a house of card at any given instance.